There are several choices for adding a date picker control when using Angular/Bootstrap. Is there one that is "better"?
Here is what I have found:
At first glance, it seemed that the Bootstrap date picker may be easier to use because it does not require including JQuery. But I wasn't sure if I was losing any functionality going that way.
Angular-ui's bootstrap datepicker is the better choice if you already include bootstrap in your angular project. With the newer version of Angular, input types of date can be parsed in both directions and will work great with angular-ui bootstrap datepicker. (with older version, you can 'patch' angular to work with date input types). Of course the angular-ui datepicker can work without the date input type as well (its just an added bonus)
Before using the angular-ui bootstrap datepicker, we used jquery ui's datepicker and had some problem around the value of the date not being a javascript date. At first it was fine and did everything we wanted, but when trying to do more complex things we ran into problems.
You could probably solve the jquery ui problems by making your own directive and getting into the nitty-gritty, but angular-ui's bootstrap datepicker just works out-of-the-box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With