I am using JQgrid and want to replace only default date to blank in date field of JQgrid.
please find code snippet for date field in JQGrid
mtype: "GET"
datatype: 'json',
colModel: [
{
name: 'Current_Linkage_Date',
index:'Current_Linkage_Date',
title: false, sorttype: "date", formatter:'date',
formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'd-M-Y',
defaultValue:null },
searchoptions: { sopt: ["eq", "lt", "le", "gt", "ge"] }
},
]
As back in controller I am getting null date as
Current_Linkage_Date = row.Field<DateTime?>(13).GetValueOrDefault(),
Kindly help me to find how i can get blank value instead default date value.
Thanking in Advance.
The date type not support
defaultValue:null, so it not works in your code.Official Doc:
Below is a list of the predefined format types