If by 'return' you meant how the date is displayed in the text box (vs. how it is returned to the RPG program, as I was originally thinking), I believe this is up to the device. It will always display the date in the device's configured date format, which can vary from user to user, and device to device. There is not a way to change that.
But, you can certainly receive the date value in RPG and format using the BIFs, in whichever way you need.
Date Widget
- David
- Profound Logic Staff Member
- Posts: 690
- Joined: Fri Jan 04, 2008 12:11 pm
- First Name: David
- Last Name: Russo
- Company Name: Profound Logic Software
- Contact:
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Date Widget
Sorry. Yes I meant how the date is displayed in the text box. I realised, once I set the field formatting of the text box to my desired format, that is the format the program will use. Not the one displayed in the text box. It would be nice to get my desired format displayed, which the profound ui datepicker did. I will be awaiting the fix :)
Thanks for your help so far.
Thanks for your help so far.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Date Widget
Paul,
It appears that Android does not support the click() method on div elements in the DOM, and we were using this for the pui.showCalendar() method. You could try to work around it temporarily by setting your 'onclick' (for the image that you've placed over the little calendar image) to the following:
This seemed to work a little better for me on Android vs. pui.showCalendar(). (Though, pui.showCalendar() works everywhere else but Android, it seems.)
However, I'm having a sporadic problem with it automatically selecting a date for me rather than just opening the date picker. Can you try this and see if you have the same problem? I'm using an Android emulator, whereas you perhaps have a real device.
I'll keep working on it, but please tell me if this works for you or not?
It appears that Android does not support the click() method on div elements in the DOM, and we were using this for the pui.showCalendar() method. You could try to work around it temporarily by setting your 'onclick' (for the image that you've placed over the little calendar image) to the following:
Code: Select all
preventEvent(event);
var obj = getObj("Date1");
obj.calimg.onclick();
However, I'm having a sporadic problem with it automatically selecting a date for me rather than just opening the date picker. Can you try this and see if you have the same problem? I'm using an Android emulator, whereas you perhaps have a real device.
I'll keep working on it, but please tell me if this works for you or not?
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Date Widget
Hi Scott, I tried it and I'm getting this error when I click/tap on the image: "Onclick Error: preventDefault is not defined".
I tried "event.preventDefault()" instead of "preventDefault(event)", and I didn't get the error. The calender did show up on my android device, but with the same behaviour that you described, with it automatically selecting a date.
I noticed that its actually selecting the date at the point where my finger touches the image widget. For e.g. the days 29 and 30 of this month are at the bottom of the calender, near where the image is when the calendar pops up, and those days are being selected when I tap the image. I notice its working fine in the browser though.
I tried "event.preventDefault()" instead of "preventDefault(event)", and I didn't get the error. The calender did show up on my android device, but with the same behaviour that you described, with it automatically selecting a date.
I noticed that its actually selecting the date at the point where my finger touches the image widget. For e.g. the days 29 and 30 of this month are at the bottom of the calender, near where the image is when the calendar pops up, and those days are being selected when I tap the image. I notice its working fine in the browser though.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Date Widget
Ah, sorry, that was a typo. I meant to type preventEvent() instead of preventDefault(), but your solution of calling event.preventDefault() should also work.
The problem you describe (the click is 'bleeding through' to the calendar, and selecting the date for you) is exactly the same problem I'm getting when I test this on the virtual android device. So, thank you for confirming that it does this for you as well. This is clearly a bug in Android. I will have to find a way to work around it.
The problem you describe (the click is 'bleeding through' to the calendar, and selecting the date for you) is exactly the same problem I'm getting when I test this on the virtual android device. So, thank you for confirming that it does this for you as well. This is clearly a bug in Android. I will have to find a way to work around it.
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Date Widget
Ok no prob. Thanks for you help so far.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Date Widget
I've found a way to work around the click "bleeding through" to the popup calendar. This fix will be included in the next release of Profound UI.
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Date Widget
Ok great. Thanks!
Who is online
Users browsing this forum: No registered users and 3 guests