[OPEN-ILS-DEV] Native browser date / time selectors in Angular?
Bill Erickson
berickxx at gmail.com
Tue Aug 13 14:53:14 EDT 2019
Thanks, Mike & Dan.
I must have been bouncing around between browsers and saw what I wanted to
see in Chrome. *sigh*
In any event, if we do move toward native widgets, we would presumably be
replacing the innards of the existing eg-date-select and forthcoming
datetime and time range selectors [1]. If so, using combinations of date
and time widgets in place of datetime-local should be an option, as long as
we retain the API.
Regarding the time picker, I prefer direct entry, so the lack of a pop-up
didn't seem like a showstopper to me, but I could be in the minority on
that one.
-b
[1] https://bugs.launchpad.net/evergreen/+bug/1834662
On Tue, Aug 13, 2019 at 2:39 PM Dan Scott <dan at coffeecode.net> wrote:
> The Browser Support section agrees with caniuse.com about the lack of
> support in Firefox for datetime-local:
> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#Browser_compatibility
>
> But date looks good and usable (per the live examples on the corresponding
> MDN page). Time is functional but I'm not sure it's as friendly as the
> ng-bootstrap implementation.
>
> On Tue, Aug 13, 2019 at 2:18 PM Mike Rylander <mrylander at gmail.com> wrote:
>
>> 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
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20190813/3c523495/attachment-0001.html>
More information about the Open-ils-dev
mailing list