When trying to do this under properties it states invalid format.
When trying to do this under properties it states invalid format.
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.
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.
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
That works great...THANK YOU
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
Hello! You would need to add at least one datepicker component on any screen (no matter if it's visible or not)