ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: necatiozbek on July 25, 2024, 09:50:53 pm

Title: Error after ColModel Date Format in result view
Post by: necatiozbek on July 25, 2024, 09:50:53 pm
Hi;

My Database incoming date value is as follows : '07.06.2023 14:35' > day.month.year

In ColModel, I format the date field as dataIndx: "ISLEM_TARIHI", dataType: "date", format: 'dd.mm.yy',  or format: 'dd.mm.yyyy',

For example, if the incoming data is 07.06.2023, the date shown in the grid is 06.07.2023.( first attached picture) -day and month change places

If I don't format the Date field in colModel the view is correct  > dataIndx: "ISLEM_TARIHI", dataType: "date" > result second picture
Title: Re: Error after ColModel Date Format in result view
Post by: paramvir on July 26, 2024, 11:25:22 am
dataType: date is used for date or datetime fields. It should be valid javascript recognizable date in either of these formats:

mm/dd/yy e.g., 07/04/1776
ISO 8601 format yy-mm-ddThh:mm:ss e.g., 1776-07-04T08:20:01 or 1776-07-04

https://paramquery.com/pro/api#option-column-dataType