DateTimePicker showing seconds with minDate
Hello,
I am using DateTimePicker in one of my forms and I have to set minDate to the same day and also remove the seconds from the picker.
When I choose minDate(now()) it displays seconds in the picker.
Also please let me know how do I make this display the date picker when I click anywhere on DateTimePicker element without using native(false)
Thank you so much.
9 Replies
->format() and pass in the selector?
Hi @toeknee , I used the format but it still shows the seconds when I use minDate.
Please let me know what do you mean by pass in the selector?
remove seconds with
->seconds(false)
it is not about storage really, it is the display in the form field which is showing seconds selection
even with seconds(false)
this is how it is displaying when I use ->seconds(false)->minDate(now())
but if I don't use minDate(now()) it shows without seconds.
bump
Solution
->minDate(now()->toDateTimeLocalString(unitPrecision: 'minute'))
It worked great, thank you so much @Leandro Ferreira