stefangabos / Zebra_Datepicker

A super-lightweight, highly configurable, cross-browser date time picker jQuery plugin
https://stefangabos.github.io/Zebra_Datepicker/
Other
398 stars 183 forks source link

Added an option "enabled_ampm" #170

Closed betheymc closed 3 years ago

betheymc commented 3 years ago

This works like enabled_seconds, enabled_minutes, or enabled_hours. It takes an array, and can be set to ['am'] only or ['pm'] only. This is a necessary option when setting minimum/maximum times on a timepicker input that is in 12 hr format.

Has been tested and works. Feel free to test more extensively. zebra_datepicker.min.js will need to be updated to include this new code, and you may want to change my syntax a bit, as I noticed you don't use as many brackets as I do.

stefangabos commented 3 years ago

looks good! i'll review it and merge it soon

stefangabos commented 3 years ago

i did some refactoring and merged the pull request thank you!

stefangabos commented 3 years ago

let me know if it works. and thanks a lot for your contributions 👍

betheymc commented 3 years ago

@stefangabos Just tested, and it works. Thanks! Is it possible to add a new release with the current code? I'd like to use the current version in the website I'm working on, and that way I have a reference point for future updates.

stefangabos commented 3 years ago

sure, i was waiting for the confirmation that it works

stefangabos commented 3 years ago

done. should also be available via npm and bower shortly

betheymc commented 3 years ago

@stefangabos Awesome, thank you!!