Closed rizki5411 closed 5 years ago
Hi @rizki5411,
You can use the API for this.
https://amsul.ca/pickadate.js/api/ https://amsul.ca/pickadate.js/api/#method-set-disable-enable
Some example code:
// get the timepicker instance
var $input = $('.datepicker').pickatime()
// Use the picker object directly.
var picker = $input.pickadate('picker')
picker.set('disable', [
// Using a collection of arrays formatted as [YEAR,MONTH,DATE]
[2016,9,3], [2016,9,9], [2016,9,20],
// Using JavaScript Date objects
new Date(2015,9,13), new Date(2015,9,24)
])
i see this example use pickadate, how to i use with pickatime?
Try it with .pickatime()
.
For most examples on this page, the date picker is used, but the same API applies to the time picker as well.
I'm trying to make a scheduling application. When the user enters a date (.pickadate) then from there the user enters the clock (.pickatime), now here he will check what time is busy from that date to then be disabled. How to do this mr?
There are events and methods for hooking into the change
and submit
events (we provide a set
event / callback).
Thank's mr, my problem has been clear
For completeness the events: https://amsul.ca/pickadate.js/api/#events-callbacks
I have two form, form date and form time.
How is it done so that when the user selects a date then the time will be disabled according to the date chosen. Thanks guys.