General Category => Help for ParamQuery Pro => Topic started by: omerix on March 20, 2019, 05:16:18 pm

Title: date format
Post by: omerix on March 20, 2019, 05:16:18 pm
The format I use: dd/mm/yy  (Day / Month / Year)

1) Screen:
2) Filter:
3) Click cell:
    3a) Open Calendar:
    3b) Select Date: ( February 8 )
    3c) After selection: ( August 2 ) The error is here!

This Code:
Code: [Select]
,{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']};}

Code: [Select]
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
if (!valid) {
that.firstOpen = false;

//initialize the editor
.on("input", function (evt) {
showButtonPanel: true,
changeMonth: true,
changeYear: true,
showAnim: '',
onSelect: function () {
this.firstOpen = true;
beforeShow: function (input, inst) {
//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 () {
Title: Re: date format
Post by: paramvir on March 21, 2019, 05:53:19 pm
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.
Title: Re: date format
Post by: omerix on May 09, 2019, 03:31:50 pm
Hello Param,


Data and Cell display:

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"
Title: Re: date format
Post by: arbyter on May 23, 2019, 10:44:59 pm
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:'',formatRaw:'',....