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
Looking through master I can tell some changes have been made since beta-8, but it's still not clear when/how DateAdapter parse is called.
As far as I can tell after the new changes parse is only called with string values from the input element, but it's still defined as abstract parse(value: any, parseFormat: any): D | null;, and unit test are still passing it numbers and Date objects.
In beta-8 parse was getting called with model values that were set on the input. This made it difficult to implement DateAdapter<string> since I couldn't tell which strings were from the model (expected to be in ISO 8601 format), and those from the user (expected to be in a format like MM-DD-YYYY).
I'm hoping the changes mean parse will only ever be called with a formatted string from the input or similar, but can't tell from the current docs/interface.
The text was updated successfully, but these errors were encountered:
As of beta 10 the datepicker will only call parse on a string. However we do intend for developers to be able to inject the DateAdapter into their own components that need to work with dates if they want, and as a convenience we allow any type to be passed to parse.
Looking through master I can tell some changes have been made since beta-8, but it's still not clear when/how DateAdapter parse is called.
As far as I can tell after the new changes parse is only called with string values from the input element, but it's still defined as
abstract parse(value: any, parseFormat: any): D | null;
, and unit test are still passing it numbers and Date objects.In beta-8 parse was getting called with model values that were set on the input. This made it difficult to implement DateAdapter<string> since I couldn't tell which strings were from the model (expected to be in ISO 8601 format), and those from the user (expected to be in a format like MM-DD-YYYY).
I'm hoping the changes mean parse will only ever be called with a formatted string from the input or similar, but can't tell from the current docs/interface.
The text was updated successfully, but these errors were encountered: