I was trying to use a datastore with date inside ( type:'date') for a grid.
All worked as expected except one thing: when the date provided from mysql is blank (as there is none), the date field in the store is calculated to 31 dec 1969.
I understand that the date type starts calculating at this date. Thus, since my blank date is incorrect, it's the value that's being calculated.
Unfortunatly, this behavior is not wanted since a blank date (at least in my case ... method the override somewhere?) means that there is no data in that field. Thus, a default date could lead to bad interpretation.
A custom renderer will not work because the date is changed before that ...
Right now, I manage to sort that out by using a string and custom formatting in my renderer ( really ugly code considering the datetimefield returns a date and not a string) Meaning I have to do something like this
/*
*Awful code
*/
if(typeof(value) == "string){
//transform in a date and change the formatting
}else{
//it's a date format directly
}
Is it possible to achieve a blank date in a grid with the date type (beside doing if(value == 31 dec 1969 :P). And in the best scenario, not overriding anything( if possible)