Author Topic: Date issue  (Read 2158 times)

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Date issue
« on: August 13, 2018, 05:54:12 pm »
I have set
Code: [Select]
format: "yy-mm-dd" in colmodel but when the request is done to DB, it is sent yy/dd/mm...how can I control the format in the request?
« Last Edit: August 13, 2018, 06:12:01 pm by queensgambit9 »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Date issue
« Reply #1 on: August 13, 2018, 06:26:10 pm »
Presuming that your question is related to inline editing,

format is used to control display of data in grid, it's not send to db.

Grid receives raw data from db and sends raw data back to grid.

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Date issue
« Reply #2 on: August 13, 2018, 06:40:59 pm »
Sorry for being a bit unclear. Not related to inline editing.

dataModel is remote.

Code: [Select]
{ title: "Date", width: 50, dataIndx: "Date", dataType: "date", format: "yy-mm-dd", hidden: false, filter: { crules: [{condition: 'equal' }] } },
in DB data is stored as yy-mm-dd but when the filter request from grid is done its sent as "yy/dd/mm" so I get no matches when date is selected...
« Last Edit: August 13, 2018, 07:59:11 pm by queensgambit9 »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Date issue
« Reply #3 on: August 14, 2018, 10:20:18 am »
column.format is for display of data in grid, it doesn't affect format of data send during filtering.

During remote filtering, the dates are send in mm/dd/yy format.

A new property column.formatRaw has been added in v5.3.0 to affect the formatting of request dates send during remote filtering.
« Last Edit: August 14, 2018, 12:34:04 pm by paramquery »

queensgambit9

  • Pro Ultimate
  • Sr. Member
  • *
  • Posts: 341
    • View Profile
Re: Date issue
« Reply #4 on: August 15, 2018, 01:35:36 am »
Ok, thanks.
Has this been changed from 5.1.0? It seemed to worked there...