ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: omerix on March 20, 2019, 05:16:18 pm
-
Hello,
The format I use: dd/mm/yy (Day / Month / Year)
Screenshot:
1) Screen: https://yadi.sk/i/AfojWZ48deF0og
2) Filter: https://yadi.sk/i/zFv9iiTxKqOCdg
3) Click cell:
3a) Open Calendar: https://yadi.sk/i/BqJqadMNmlTXOA
3b) Select Date: https://yadi.sk/i/4AVjkWpWNK57Yg ( February 8 )
3c) After selection: https://yadi.sk/i/MtkGiISOg8xIeA ( August 2 ) The error is here!
This Code:
,{title: 'Boya Termin', dataIndx: 'SP_HEDEFTERMIN', width:85,dataType:'date',format:'dd/mm/yy',formatRaw:'dd/mm/yy',editable:true,clsHead:'pqu'
,filter: { crules: [{ condition:'between'}]}
,editor: {type: 'textbox',init: dateEditor}
,render: function (ui) {return {cls:ui.rowData['SP_HEDEFTERMINRENK']};}
}
var dateEditor = function (ui) {
var $inp = ui.$cell.find("input"),
grid = this,
validate = function (that) {
var valid = grid.isValid({
dataIndx: ui.dataIndx,
value: $inp.val(),
rowIndx: ui.rowIndx
}).valid;
if (!valid) {
that.firstOpen = false;
}
};
//initialize the editor
$inp
.on("input", function (evt) {
/*validate(this);*/
})
.datepicker({
dateFormat:'dd/mm/yy',
showButtonPanel: true,
changeMonth: true,
changeYear: true,
showAnim: '',
onSelect: function () {
this.firstOpen = true;
/*validate(this);*/
},
beforeShow: function (input, inst) {
setTimeout(function(){
//to fix the issue of datepicker z-index when grid is in maximized state.
$('.ui-datepicker').css('z-index', 999999999999);
});
return !this.firstOpen;
},
onClose: function () {
this.focus();
}
});
}
-
I don't see error in the screenshot. Can you provide a jsfiddle/plnkr.
That red triangle in the top left corner denotes dirty cell.
-
Hello Param,
Code:
http://jsfiddle.net/4pvfsmwq/
Data and Cell display:
https://yadi.sk/i/ggx9q0mOdqlg8g
It would be nice if we could save the format for all fields in the lang file.
dateFormat = "dd / mm / yy"
dateFormatFull = "MM / dd / yy"
-
hi omerix
i found a workround.(quick and dirty). Just declare the date-field as string, then it will accept dd/mm/yyyy format.
{title: "Datum", width: 100, dataType: "string", dataIndx: "datum",format:'dd.mm.yy',formatRaw:'dd.mm.yy',....