Page 1 of 1

Assign Input Type of Date

Posted: Fri Jul 18, 2014 3:20 pm
by Roger

I am struggling with this simple thing. I have an input control on my page with type=date. On page load i would like to set it = to the current date.

I am using the following code that just does not work.

var today = new Date();

Appery ("BatchHdr_StopDate").val(today.toISOString ());

I have also tried;
Appery ("BatchHdr_StopDate").val(today);

I cannot get this to work. Any ideas?


Assign Input Type of Date

Posted: Fri Jul 18, 2014 4:03 pm
by Kateryna Grynko

Hi Roger,

Use the following code please:prevar today = (new Date()).toISOString();
Appery("mobiletextinput_3").val(today.split("T")[0]);/pre


Assign Input Type of Date

Posted: Fri Jul 18, 2014 4:08 pm
by Roger

Katya,

That worked...THANK YOU!!


Assign Input Type of Date

Posted: Mon Aug 11, 2014 7:55 pm
by Roger

Katya,

For this input type of date how do I set a format so that when the native control (iOS) is displayed it shows the day of the week? Right now it just shows Month, day and year.


Assign Input Type of Date

Posted: Mon Aug 11, 2014 11:02 pm
by Yurii Orishchuk

Hi Roger,

Please read this: http://stackoverflow.com/questions/73...

If this issue is critical for your app, you can use "DatePicker" component that's allow to set date format.

Regards.


Assign Input Type of Date

Posted: Tue Aug 12, 2014 1:21 pm
by Roger

thanks for the info. We are actually moving away from the datepicker as it is tedious to use on a mobile device.