Hello,
I want to bind a simple span tag to a date field. I need to specify that the date should be formatting as a shortdate, using the current culture. I know I can create a function on my viewmodel to do the formatting and bind the span to that function.
But that feels a bit as overkill.
Can I specify the format in the data-bind itself somehow?
Something like: <span data-bind="text: {mydatefield:d}"/>
Regards, Jaap
I want to bind a simple span tag to a date field. I need to specify that the date should be formatting as a shortdate, using the current culture. I know I can create a function on my viewmodel to do the formatting and bind the span to that function.
But that feels a bit as overkill.
Can I specify the format in the data-bind itself somehow?
Something like: <span data-bind="text: {mydatefield:d}"/>
Regards, Jaap