[OPEN-ILS-DEV] Native browser date / time selectors in Angular?
Mike Rylander
mrylander at gmail.com
Tue Aug 13 14:17:30 EDT 2019
First, +1M to using the builtins!
However, I just fired up Firefox to test empirically and I'm getting
the default text input. CanIUse
(https://caniuse.com/#search=input-date) seems to agree that FF isn't
yet there with datetime-local, sadly.
Hopefully soon? (Or we could drop FF support... j/k, mostly.)
Thanks for bringing it back up, in any case.
--
Mike Rylander
| Executive Director
| Equinox Open Library Initiative
| phone: 1-877-OPEN-ILS (673-6457)
| email: miker at equinoxinitiative.org
| web: http://equinoxinitiative.org
On Tue, Aug 13, 2019 at 1:39 PM Bill Erickson <berickxx at gmail.com> wrote:
>
> Hi All,
>
> For a long time, Firefox didn't support date and time <inputs/> -- no calendar widget, no controls, etc. Because of this, we have traditionally relied on the date / time pickers provided by the toolkit (ng-bootstrap in Angular).
>
> However, Firefox does now support date [1], time [2], and datetime-local [3] input types, as does Chrome. Date selectors provide calendar widgets, all variations provide 'clear' actions, increment/decrement actions (buttons and arrow key), input validation, and manual entry w/ support for automatically jumping to the next field once a value part is entered (e.g. hours => minutes).
>
> It looks like they do everything we need, but I could be overlooking something...
>
> Is there any value in continuing to use the ng-bootstrap widgets for date and time selectors? Thoughts on migrating to native browser widgets?
>
> -b
>
> [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date
> [2] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time
> [3] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local
>
More information about the Open-ils-dev
mailing list