Page 1 of 1

how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Tue Jun 04, 2013 5:04 pm
by Roger

When trying to do this under properties it states invalid format.


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Tue Jun 04, 2013 5:28 pm
by Kateryna Grynko

Hi Roger,

It's a bug. Will be fixed.
There is a workaround. On Page Show event add Set Property action for datepicker, Property Name Date Format and paste it there.


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Mon Jun 17, 2013 7:34 pm
by Roger

Okay, using set property works...thanks.

Can I set the Default Date or Date Value with an event as well. When the page loads I would like to initialize the date picker to the current date.


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Mon Jun 17, 2013 9:06 pm
by Kateryna Grynko

You can set the date format on the screen load. In builder there is a bug with date format validation.

Set the current date on load or when you need to:
codeAppery("mobiledatepicker_2").setProperty("defaultDateValue", "date as a string in the proper format");/code
i.e. something like this:codeAppery("mobiledatepicker_2").setProperty("defaultDateValue", $.datepicker.formatDate("DD, d MM, yy", new Date()));/code


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Tue Jun 18, 2013 11:55 am
by Roger

That works great...THANK YOU


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Wed Jun 19, 2013 9:21 pm
by Yves Senn

Hello all,

I also would like to change the date format. Currently i kinda hit a wall here ;) dont know what i am doing wrong.

When the service runs and data is mapped, the following code is called:

code
'PATH': ['validTo'],
'ID': 'memberValidTo',
'ATTR': 'value',
'TRANSFORMATION': function(value, element) {
Appery("memberValidTo").setProperty("defaultDateValue", $.datepicker.formatDate("dd.mm.yyyy", new Date(value)));
}
/code

which produces the following error:
codeTypeError: Cannot call method 'formatDate' of undefined/code

Value passed is:
code"2013-12-31T23:00:00.000+0000"/code
Any ideas would be welcome. Thank you!

Cheers Yves


how can I change dateFormat on datepicker to DD, d MM, yy

Posted: Thu Jun 20, 2013 7:45 am
by Maryna Brodina

Hello! You would need to add at least one datepicker component on any screen (no matter if it's visible or not)