Set Minimum Validation Value on a Grid Date Column

Environment

Product Grid for Progress® Kendo UI®

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
Not finding the help you need? Improve this article