0

I'm new to DotVVM and just playing with it for the moment.

My model has a DateTime property When i edit this in a form with

  <dot:TextBox   Text="{value: Datum}"  size="20" />

Full datetime is shown like "2018-02-08T13:02:42.0000000" Editing the string is possible, and sending the object back to the viewmodel works fine.

When i add a Formatstring like "yyyy-MM-dd" the property is NULL in the json sent to the app.

How can i fix this? Is it possible to include my own JsonConverter for DateTime conversion? (In this example i only need the date property)

Luc Wuyts
  • 21
  • 2

1 Answers1

0

In order to use dates in TextBox, you need to add ValueType="DateTime" (and to use specific format, you can add FormatString="d" for example).

Tomáš Herceg
  • 1,595
  • 1
  • 13
  • 18