Closed crazyjat closed 8 years ago
Currently, no. The timezone is set when linked: https://github.com/eight04/angular-datetime/blob/master/src/directive.js#L199 . It is like a switch to change between input[datetime]
and input[datetime-local]
. (Note that there is no browser supporting datetime
: https://github.com/whatwg/html/issues/336)
Should we implement it?
For now i am using ng-if to switch between 2 versions of the directive, which is not ideal. I might do a pull to add support for it dynamically. It would be very useful if the datetime-utc directive could be triggered by a property.
Maybe we can create a binding ($watch) if attrs.datetimeUtc
is a string and length > 0.
<input ... datetime-utc="aVar">
Then we create a binding to scope.aVar.
Fixed in 3.2.0.
I need the ability to display the time in local time or utc based on a user selection. Is there currently a way to dynamically change the timezone of the input field?