Hi,
I attempted to use an text mask with datepicker component, but no success.
I've set an function to created property on datepicker to create a input text mask. The mask appears on the input, but does not work well. When i try to input some date like "02/2019" the text makes it "2/2019" and when it looses focus, it throws an error:
Cannot read property 'className' of undefined
I tried to use theese two threads, but none of them resolved my problem. Theese two specify some property called focustOut,but i didn't find.
Can some example with Javascript be provided?
Here is the snippet code
dtPickerInicio = new ej.calendars.DatePicker({
value: data.dataInicioEntradas,
max: moment().endOf('month')._d,
start: 'Year',
depth: 'Year',
format: 'MM/yyyy',
change: function (args) {
refreshDateRanges();
},
enabled: !isEdit,
strictMode: true,
created: onCreated,
}, args.form.elements.namedItem('f_datainicio'));
function onCreated() {
new ej.inputs.MaskedTextBox({ mask: '00/0000', placeholder: '__/____' }).appendTo(this.element);
}