I had a problem changing the value. In one method when a form is created, I create a DateTimePicker. Also in the form there are buttons like time templates, when clicked, the template time should be set by template . When pressed, the value changes visually, but after submitting the form, the value is set to the original :(.