Hello,
When I paste data from Excel to the grid, only "yyyy-mm-dd" is accepted as the date format.
Is there a solution other than making datetype="string"?
Options:
fmtDate: 'dd/mm/yyyy',
fmtDateEdit: 'dd/mm/yyyy',
fmtDateFilter: 'dd/mm/yyyy'
colModel
{
title: 'Date Column',
dataIndx: 'date1',
dataType: 'date',
halign: 'center',
desc: 'Process Date',
hidden: false,
editable: true,
format: 'dd/mm/yyyy',
editor: { type: 'textbox', init: dateU },
filter: { crules: [{ condition: 'between' }], menuIcon: false }
}
dateU function
function dateU(ui) {
ui.$cell.find("input")
.datepicker({
changeMonth: true,
changeYear: true,
dateFormat: pq.excelToJui(ui.column.format),
showAnim: '',
onSelect: function () {
this.firstOpen = true;
},
beforeShow: function (input, inst) {
setTimeout(function () {
$('.ui-datepicker').css('z-index', 999999999999);
});
},
onClose: function () {
this.focus();
}
});
}
function dateB(ui) {
ui.$cell.find("input")
.bootstrapDatepicker({
format: ui.column.format,
})
.on('changeDate', function (e) {
$(this).focus();
$(this).bootstrapDatepicker('hide');
})
}
function date(ui) {
ui.$cell.find("input")
.attr("type", "date")
.on("focus", function () {
this.showPicker?.();
})
.click();
}