Check if user selected date time is within range

Hi All,

I have a date time field for which the user is selecting date and time in 24hours format ex: ‘2015-05-05 08:00:00’

What I required:
If selected date time is not in range “08:00” to “20:00” than it should error alert

Any help will be highly appreciable

Regards

Convert the date string to a date object, then check to see if date.hour() and date.minute() fall within that range.

HTH,

:slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.