0
votes

I'm trying to make a masked DatePicker using Kendo UI. Fortunately i have found an example how to achieve this:

http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/datepicker/how-to/masked-date-picker-grid

Unfortunately i can't change the mask from 00/00/0000 into this one:

$(element).kendoMaskedTextBox({ mask: that.options.dateOptions.mask || "rrrr-mm-dd" })

Because it breaks its functionality. Anyone got any ideas how can i change mask in this example ?

1

1 Answers

0
votes

Along with the mask, the format needs to set as well when initializing the plugin

$('#datePicker').kendoMaskedDatePicker({
    dateOptions: {
        mask: '0000-00-00',
        format: 'yyyy-MM-dd'
    }
});

I've created an updated sample here for you to verify.