dart - Binding a DateTime to a date input field with Polymer -
what's best way that?
when bind value of input element datetime instance, string returned:
<input value="{{mydate}}" type="date">
is there specific attribute bind input datetime instance?
or should use filter?
[edit]
here working filter (only works "date" input type): https://gist.github.com/vloz/10553552
input
elements don't provide attribute provides typed value of input. you'll need provide custom handler parses string
value , updates element's datetime
typed attribute.
e.g.
<input type="date" value="{{datestring}}"> ... // inside element's script... date: null, // datetime typed attribute // handler automatically works datestringchanged: function(oldvalue, newvalue) { this.date = datetime.parse(newvalue); // how error handling too? },
Comments
Post a Comment