Unplanned
Last Updated: 18 Jun 2021 11:44 by Mark
Mark
Created on: 18 Jun 2021 11:44
Category: Form
Type: Bug Report
1
DatePicker is rendered in the Form when the string could be evaluated as Date

Bug report

When a string that could be evaluated as a Date is used in the Form, a DatePicker is rendered instead of TextBox

Reproduction of the problem

  1. Open the Dojo linked here

Current behavior

The fromData for the first field is set as string 'TextBox1: "12/11/1969"', however, the '12/11/1969' could be evaluated as a Date. Thus, the From displays a DatePicker although the field is not explicitly casted to Date.

Expected/desired behavior

When the value is not explicitly set as a Date a TextBox should be rendered in the Form.

Workaround

var MyModel = kendo.data.Model.define({
              fields: {
                  "TextBox1": {
                      type: "string"
                  },
                  "TextBox2": {
                      type: "string"
                  }
              }
          });

Dojo

Environment

  • Kendo UI version: 2021.2.616
  • Browser: [all]
0 comments