This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
input[type=datetime-local] does not support changing the timezone dynamically #13382
Milestone
Comments
One problem with tracking the timezone is that it is not clear what should happen when it changes:
@Narretz, any thoughts on this ? |
The behaviour I personally would like is for the displayed value to change - the unix timestamp should remain the same. I was able to work around this issue by forcing a re-render using the directive here http://stackoverflow.com/questions/22080351/how-to-re-render-a-template-in-an-angular-directive |
ngModelOptions doesn't watch option changes - this is currently by design. We could change that, but so far I haven't seen many requests for it. For the original options (updateOn, debounce) this wasn't much of a problem, but timezone is a bit of an outlier. We probably shouldn't have put it in there in the first place. |
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Nov 21, 2017
This commit also fixes a bug where part of the Date object was re-used even after the input was emptied. Fixes angular#13382 Closes angular#16181
3 tasks
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Nov 21, 2017
This commit also fixes a bug where part of the Date object was re-used even after the input was emptied. Fixes angular#16181 Closes angular#13382
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Dec 13, 2017
This commit also fixes a bug where part of the Date object was re-used even after the input was emptied. Fixes angular#16181 Closes angular#13382
Narretz
added a commit
to Narretz/angular.js
that referenced
this issue
Apr 6, 2018
This commit also fixes a bug where part of the Date object was re-used even after the input was emptied. Fixes angular#16181 Closes angular#13382
This was referenced Apr 18, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The timezone can be set on
type="datetime-local"
inputs (e.g.ng-model-options="{timezone: '+0400'}"
), but once the datetime picker has been created, changes to the timezone are not reflected in the edited value.This plunk demonstrates the issue: http://plnkr.co/edit/R1cFGi23y0Eq2Fe7iN5h?p=preview - when you click the button then the timezone is put forward an hour, but this is not reflected in the time shown.
This happens in at least Chrome and Firefox on OS X, via angular
1.4.7
.The text was updated successfully, but these errors were encountered: