How to reset date in .set
How to reset date in .set

Hi ,
$('#packageaccounttable').on( 'click','#setrowempty', function (e) {
editor
.edit( $(this).closest('tr'), false )
.set ('particular','')
.set ('purchase_amt',0)
.set ('sale_amt',0)
.set ('remarks','')
.set ('vendor','')
.set ('booking_date','0')
.set ('payment_date','0')
.set ('payment_mode','')
.set ('booking_id','')
.set ('payment_made','')
.set ('voucher_issued','N')
.submit();
} );
in above example every columns is initializing except booking_date and payment_date.
after sumit shows 01-01-1970
should be 00-00-0000
How to do this.
Regards.
Sunil
Answers
Hi Sunil,
Try
new Date()
.Allan
Wow, Allan, thanks for the tip)
Hi Allan,
new Data() set as Current Date , i want to initialize date so that show 00-00-0000 or 0000-00-00.
Regards.
Sunil
I don't think its possible to represent 0000-00-00 with the Date object. Trying
new Date(0,0,0)
results inSun Dec 31 1899 00:00:00 GMT+0000 (GMT)
.If you use a formatted field with moment.js it should be possible to set the value that way and I think moment will probably cope with dates prior to 1900.
Allan