djibe / material

Material Design 2 for Bootstrap 4 (active fork of Daemonite Material)
https://djibe.github.io/material/
MIT License
68 stars 11 forks source link

Reset date in DatePicker #31

Closed gaurav2103 closed 3 years ago

gaurav2103 commented 3 years ago

@djibe how can we reset the date value that is being selected using a reset button not the clear one which is there in picker is their some way of doing it?

gaurav2103 commented 3 years ago

consider this scenario for better understanding :

I have three select dropdown country, state, district now I select all these three after that I pick the date from the picker to consider it 09/09/2020 now I have one button which resets all the fields value all other fields are being reset by that I have written the logic but when it comes to picker it clears the value from input but when pickup pop-ups again the previously selected date is selected

djibe commented 3 years ago

Hi, you are talking of pickadate Picker (https://djibe.github.io/material/docs/4.6/material/pickers/) ?

You may use .clear method as in the official documentation: https://amsul.ca/pickadate.js/api/#method-clear

gaurav2103 commented 3 years ago

@djibe Thanks its working the way i want