Open pankas87 opened 8 years ago
I think it is because currently format expects a string as opposed to a variable to watch. It's passing the string deletion_date.format
to momentjs to format your date.
If you put curly braces around the param so that angular inserts the variable contents into the attribute, it would work. Such as, format="{{::deletion_date.format}}"
. The two colons mean it will be a one-time binding, and angular will not bother checking if this value has changed. If you need to change the format, you should use a pickerUpdate
event.
This one worked perfectly, it can be closed I guess
I'm using the input datepicker and everything works great except for the format.
When I don't use the format attribute it displays the date correctly with the default format but when I add the format attribute all I can see are strange characters.
Here's my code for both the angularJS controller and the view
(Both are simplified versions)
Am I missing some parameters or configuration?