Topic: Problem setting start date in DatatimePicker
Francis Souza free asked 2 years ago
How do I start date and time from the current day (New Date()) using DataTimePicker
My code:
const d = new Date(); const h = d.getHours() + ':' + d.getMinutes(); const pickerTimeOptions = document.querySelector('#datetimepicker-dateOptions'); new mdb.Datetimepicker(pickerTimeOptions, { datepicker: { min: d}, timepicker: { minTime: d }, });
I want the start time to be applied only on the current day... that way it applies to everyone, how do I block the past time of the current day only?
is there any other start date option that works in datatimepicker?
Mateusz Lazaru staff answered 2 years ago
Hi,
Currently there is no option to something like this, however I think it could be good feature, so I've added it to our todo list. Any workaround also isn't possible as long as timepicker has not update()
method.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 4.2.0
- Device: Computer
- Browser: Chrome
- OS: Window 10
- Provided sample code: No
- Provided link: No