Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Setting Datepicker value

I am trying to set Datepicker value from database. Database holds date value, which i read it in some "List" query, and using List's results I am trying to set the date picker value. I tried lots of options but I could not set properly date value.
I tried following link also and tried all of the options
https://getsatisfaction.com/apperyio/...

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Setting Datepicker value

Hello,

This thread should be useful https://getsatisfaction.com/apperyio/...

Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Setting Datepicker value

I tried the solution as per thread you recommended but it didn't work.
I added an "Alert" for newFormat", it did display right value but date picker component is not getting updated.

var newFormat = /(\d+.\d+.\d+)\s/gi.exec(value)[1];
return newFormat;

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Setting Datepicker value

Hello Archana,

Please check this JS code proccessor:

prevar date = new Date(value);
return ('0' + (date.getMonth() + 1)).slice(-2) + "/" + ('0' + date.getDate()).slice(-2) + "/" + date.getFullYear();/pre

Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Setting Datepicker value

I am still having issues
alert(value); == This gives proper date
var date = new Date(value);
alert(date); === This shows "invalid date"
alert(('0' + (date.getMonth() + 1)).slice(-2) + "/" + ('0' + date.getDate()).slice(-2) + "/" + date.getFullYear()); === This shows "Nan/Nan/Nan"

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Setting Datepicker value

This gives proper date

Please write here, what do you see

Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Setting Datepicker value

2015-06-08 00:00:00.000

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Setting Datepicker value

It works fine for us. Please provide us with a public app link (http://devcenter.appery.io/documentat...) and steps to reproduce.

Archana Bongale
Posts: 0
Joined: Tue Jul 01, 2014 3:53 am

Setting Datepicker value

Is there a way I can share the app with you and not make it public?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Setting Datepicker value

Hello Archana ,

Yes, you can, please just tell us its name:
https://devcenter.appery.io/documenta...

Return to “Issues”