I’m using this datetime picker and want to set the minDate to today at 8 am.
The timepicker has the attribute minDate that can take input like new Date(2012, 05, 15, 8, 00). I would like it be able to do something like new Date(getFullYear(), getMonth(), getDate(), 8, 00), but that doesn’t seem to work.
Is there any way to do that?
You can create a
Dateobject (MDN) with the current date/time and then adjust it to your needs like the following, before passing it on to the datetime picker.Note that this uses the local time of the user, which may be different from your server time!