tempusdominus / bootstrap-4

Tempus Dominus Bootstrap 4 Datetime Picker
https://getdatepicker.com/5-4/
MIT License
611 stars 239 forks source link

Important Bug: If two controls on the same page need different settings, such as one that only displays the date and one that only displays the time, it is not possible. #334

Open hera2019 opened 4 years ago

hera2019 commented 4 years ago

If two controls on the same page need different settings, such as one that only displays the date and one that only displays the time, it is not possible.

hera2019 commented 4 years ago

I found a solution: modify the code of file tempusdominus-bootstrap-4.js. Modify every variable MinViewModeNumber to member variable this.minViewModeNumber. Make each instance have its own independent settings variable.

Complete code of the modified file: https://www.fengshunjp.com/ittech/3895/

ovalek commented 4 years ago

I'm not sure about the second bug, since I didn't have that problem. Not even the docs https://tempusdominus.github.io/bootstrap-4/Usage/ could work, since there are many datetimepicker instances.

Nonetheless I can confirm the first bug concerning clearing the date, as described in https://www.fengshunjp.com/ittech/3895/.