New to Kendo UI for jQuery? Download free 30-day trial

Set Minimum Validation Value on a Grid Date Column

Environment

Product Progress® Kendo UI® Grid for jQuery

Description

This sample demonstrates how to set minimum validation value when editing a Grid column.

Solution

This can be achieved using the model configuration on the Grid dataSource schema.

 <div id="grid"></div>

    <script>

      $("#grid").kendoGrid({  
        dataSource: {
          data: [
            { Date1: new Date()}
          ],
          schema: {
            model: {
              fields: {
                Date1: { type: "date", validation:{min: new Date()} }
              }
            }
          }
        },
        columns: [{
          field: "Date1",
          format: "{0: yyyy-MM-dd}"
        },
                  {
                    command: ["edit", "destroy"],
                    title: "&nbsp;",
                    width: "250px"
                  }],  
        editable: "inline",
      });
    </script>
In this article