You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
It seems like writeValue is being called before the format is set from the component so it uses the default.
Right now in my app I am proxying the writeValue for the DatePicker to have the correct format (as a hack) before this gets fixed in the library.
This is my current hack:
const _dateFormat = 'MM/DD/YYYY';
const writeValue = Md2Datepicker.prototype.writeValue;
// need to override this function because the format is set wrong here
Md2Datepicker.prototype.writeValue = function (value): void {
this.format = _dateFormat;
writeValue.call(this, value);
};
nlubin-lv
changed the title
Format of datepicker is only used on select
Format of datepicker not being used on render.
Jan 24, 2017
The passed format to the datepicker only is being used when a new date is selected, when it first loads it uses the default format.
Template:
The text was updated successfully, but these errors were encountered: