Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

input[time] renders with milliseconds if the browser does not support time input #10721

Closed
chris-rock opened this issue Jan 12, 2015 · 15 comments · Fixed by #16584
Closed

input[time] renders with milliseconds if the browser does not support time input #10721

chris-rock opened this issue Jan 12, 2015 · 15 comments · Fixed by #16584

Comments

@chris-rock
Copy link

Whenever a browser does not support input[time] natively, angular falls back to text field. It renders nicely in Chrome (e.g. 07:15 AM), but in Firefox it will display 07:15:00.000 instead. There are some quick hacks out there: http://mark.zealey.org/2015/01/08/formatting-time-inputs-nicely-with-angularjs

It would be nice, if we could configure the date format whenever angular switches in fallback mode.

The problem is located in input.js where we set the format to 'HH:mm:ss.sss'

@mightydes
Copy link

+1 for this feature

@JeanMeche
Copy link
Member

+1

1 similar comment
@wilgert
Copy link

wilgert commented Oct 5, 2015

+1

@simonbuehler
Copy link

it would be great if the formatter of the input could be overridden, in one project i need the time(span) to be entered as 'mm:ss.sss' without hours which would be possible with a custom formatter

@ismarslomic
Copy link

+1

1 similar comment
@heroInCommunity
Copy link

+1

@bsandrow
Copy link

Update to input.js link in the original bug report.

@SamMorrowDrums
Copy link

This isn't really a feature request, this is a regularly occurring bug. The fallback behaviour should surely mimic the behaviour of the standard HTML 5 time input, adding milliseconds doesn't really seem like a useful fallback, it's got to be the niche case!

@Narretz Narretz modified the milestones: 1.5.x, Backlog Jun 15, 2016
@Nickproger
Copy link

+1

@Narretz Narretz modified the milestones: Backlog, 1.5.x Apr 24, 2017
@hubo1016
Copy link

AngularJS should respect HTML5 "step" attributes on the input element. According to HTML5 standard, when step is set to "60", value of the input should only contains minutes "11:23", while when step is set to "1" or some number less than 60, value should contains seconds e.g. "11:23:34"

@Narretz
Copy link
Contributor

Narretz commented Nov 30, 2017

@hubo1016 This is a different issue. You can open a new issue as a separate feature request.

@pgnjidic
Copy link

pgnjidic commented Jan 11, 2018

The problem can be solved by the directive on this link:

https://markandruth.co.uk/2015/01/08/formatting-time-inputs-nicely-with-angularjs

@waqasilyas
Copy link

Worked with v1.0.3 it seems... http://jsfiddle.net/yk29zeLz/1/

@roxolan
Copy link

roxolan commented Mar 5, 2018

+1 for this feature

@petebacondarwin
Copy link
Contributor

Note that this issue has had the PRs plz label for almost a year. It is probably not that hard to fix. Does someone in the community - perhaps someone affected by the problem? - want to step up and provide a PR?

@Narretz Narretz modified the milestones: Backlog, 1.7.x May 2, 2018
@Narretz Narretz self-assigned this May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.