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
Cannot have a datepicker with an empty ng-model because it shows invalid date or the current date. I think it would be a good idea to have an option to specify if I want to have a value when the model is initialized (with the current date) or an empty object (or string). There are some cases (such as having a form where the input field related to the datepicker is not required) when it is not necessary to select a date; it is confusing then that the current date appears always in the input field. I made a workaround for this and modified the code below sending an empty string in the function "formatter". This is only a workaround but I think a functionality like this will add value to your component.
function formatter(value) {
return value != "" ? dateFilter(value, format, timezone) : "";
}
The text was updated successfully, but these errors were encountered:
Cannot have a datepicker with an empty ng-model because it shows invalid date or the current date. I think it would be a good idea to have an option to specify if I want to have a value when the model is initialized (with the current date) or an empty object (or string). There are some cases (such as having a form where the input field related to the datepicker is not required) when it is not necessary to select a date; it is confusing then that the current date appears always in the input field. I made a workaround for this and modified the code below sending an empty string in the function "formatter". This is only a workaround but I think a functionality like this will add value to your component.
function formatter(value) {
return value != "" ? dateFilter(value, format, timezone) : "";
}
The text was updated successfully, but these errors were encountered: