I am using (jquery-simple-datetimepicker) for a small restaurant application. the restaurant timing is from 6 am to 12 am. My issue is the time interval starts from 00:00 to 23:30 in the dropdown but, it should show the time interval of 1 hour.
for example, if the current time is 10 am the interval should start from after 6 hours that is 4:00, 5:00
till 12:00 am
. and if the time is 7: pm
or after then it should show time for next day that is 6:00,7:00
till 12: am
.
will I able to achieve in this plugin or do you prefer any other customizable plugins?
here is my code
$('#datetimepicker2').appendDtpicker({
todayButton: true,
step: 60,
closeOnSelected: true,
minuteInterval: 30,
onSelect: function() {},
onInit: function(handler) {
var picker = handler.getPicker();
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://www.jqueryscript.net/demo/jQuery-Date-Time-Picke-Plugin-Simple-Datetimepicker/jquery.simple-dtpicker.js"></script>
<link type="text/css" href="https://www.jqueryscript.net/demo/jQuery-Date-Time-Picke-Plugin-Simple-Datetimepicker/jquery.simple-dtpicker.css" rel="stylesheet">
<input type="text" name="date9" id="datetimepicker2">
can anyone help me out, please?