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
Can we have a date template please?
Here is what I'm trying to do: the dates I get are in ISO format, the backend expect ISO from me, however the user will see the date based on the configured locale, so I have the option to turn the ISO date string to date object and back and worry about the timezone etc.. which I don't want worry about
So I'm using dataType="string" without dateFormat
Now my only issue that I have to convert the dates from ISO to the locale string when loading, and reverse that when submitting.
However if there is a way to separate the displayed value from the actual model value then no transformation required.
I was thinking maybe a pipe, template, allow dataType to take a function or a [displayType] propriety etc..
Please let me know if there is a way Im missing, I had this with other libraries and it saves time and avoid mistakes
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Can we have a date template please?
Here is what I'm trying to do: the dates I get are in ISO format, the backend expect ISO from me, however the user will see the date based on the configured locale, so I have the option to turn the ISO date string to date object and back and worry about the timezone etc.. which I don't want worry about
So I'm using
dataType="string"
without dateFormatNow my only issue that I have to convert the dates from ISO to the locale string when loading, and reverse that when submitting.
However if there is a way to separate the displayed value from the actual model value then no transformation required.
I was thinking maybe a pipe, template, allow dataType to take a function or a [displayType] propriety etc..
Please let me know if there is a way Im missing, I had this with other libraries and it saves time and avoid mistakes
Beta Was this translation helpful? Give feedback.
All reactions