How to limit
I am trying to limit the time that the user can choose from this plugin: https://github.com/Eonasdan/bootstrap-datetimepicker
I looked at this site and Google on similar issues, but users usually ask for validation to work between one known period and another known period. e.g. 9:00 - 21:00 2015/03/09 9:00 - 2015/03/10 21:00. If the user enters the data at 2015/03/09 23:00, the check will go so, because the time is within these two minutes / maximum periods.
I need it to work, how the reservation system works, so that every day is limited between these times. for example, if the user selects 2015/03/09 23:00 or 2015/03/10 5:00, then the confirmation will not take place, it will take place only on any day from 9:00 to 21:00.
$('.datetimepicker').datetimepicker({ stepping: 30, minDate: moment({hour: 9, minute: 30}), format: 'YYYY-MM-DD HH:mm' });
Min begins the date for today is at 9:30 in the morning, but if I were to choose any day after today, I could choose, for example, 4am - nothing at 9:30 in the morning
Samus source share