cancel
Showing results for 
Search instead for 
Did you mean: 
walter9000
Nintex Newbie

Validate Control Date/Time to start from 5.AM to 11. PM

Hello Team, I was wondering if is possible set up a control Date/Time to default value 5.AM avoiding from 12 am to 4 am? what i need is keed a range from 5.am to 11 pm. Thanks in advance. Regards

Labels: (1)
Tags (2)
0 Kudos
Reply
1 Reply
lakshminarayana
Nintex Newbie

Re: Validate Control Date/Time to start from 5.AM to 11. PM

Try this code.

NWF$(document).ready(function()
{
var fullDate = new Date()
var twoDigitMonth = ("0" + (fullDate.getMonth() + 1)).slice(-2)
var hours = fullDate.getHours();
var minutes = fullDate.getMinutes();
var currentDate = fullDate.getDate() + "/" + twoDigitMonth + "/" + fullDate.getFullYear();
if (hours < 10) { hours = "0" + hours; }
minutes = minutes - 2.5;
minutes = 5 * Math.round( minutes / 5 );
NWF$('#' + fldDate).val(currentDate);

NWF$('#' + fldDate+ " + IMG + SELECT").val('10 AM');
NWF$('#' + fldDate+ " + IMG + SELECT + SELECT").val('45');

});

0 Kudos
Reply