on 05-19-2016 11:13 AM
hi Teja,
you can bind the "firstDayOfWeek" attribute of the DateNavigator to a context attribute (SimpleType = com.sap.ide.webdynpro.uielementdefinitions DayOfWeek). in your wdDoInit() method you can set this value. Example - the binded attribute is "dayOfWeek":
wdContext.currentContextElement().setDayOfWeek(WDDayOfWeek.SATURDAY);
which would result in
regards,
christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi again,
in your view create a new context element (example: name=firstDayOfWeek and the type i've mentioned before com.sap.ide.webdynpro.uielementdefinitions DayOfWeek)
then select the "firstDayOfWeek" attribute in the propertyview. on the left you click on the bind button and select the attribute you've created before (firstDayOfWeek).
so far so good - now in the wdDoInit() method of your view you set the value of this attribute like i described before:
wdContext.currentContextElement().setDayOfWeek(WDDayOfWeek.SATURDAY);
regards,
christian
hi Teja,
i'm not sure if i've fully understood your requirement: you try/want to change the starting day of the calendar based on user input? if so - yes - you have to follow the procedure as mentioned above. if the user has selected the starting day you then have to set the value of the binded dayOfWeek attribut accordingly.
regards,
christian
Hi Christian,
Let me explain you clearly. I have an InputField and calendar is attached to it.
Upon Clicking on above field, I am getting a calendar shown as below:
It contains starting day as Sunday and ending date as Saturday. How can I change the starting date to saturday and ending date as friday.
Thanks and Regards,
Teja.
Hi Teja,
Based on your feedback you can achieve this by following my previously explained steps (it should always start saturday and end at friday right?)
regards,
Christian
Hello Christian,
i think you still not even got the problem. He uses a input field that was bound to a attribute of type date. So the WD4J run-time provides a datePicker. He can't set any firstDayOfWeek attribute since it is a simple input field.
@Teja: I don't think it is possible what you a trying to do. At least I don't know any param in the WD4J run-time to configure this.
Best Regards,
Tobias
Hi Tobias,
yup - apparently i didn't got the problem at this point.
after looking again at the provided picture i see that the calendar is a dropdown of mapped input field. thanks for pointing that out.
@Teja: sorry for the misinterpretation. i agree with Tobias on this one. Even if a parameter for this exist it would affect all web dynpro applications on your system (WD4J runtime configuration)
regards,
Christian
Hi Teja,
Long story short: no - not as you intend (see answer of Tobias).
I've done some research. The appearance of the calendar (dropdown via date-inputfield) is defined by the locale of the user accessing your application. Example: If your user has the locale en_GB set in its user profile then the firstDayOfWeek is 'Monday' - if it is set to en_US then the firstDayOfWeek is 'Sunday'.
If is/was possible to access the calendar object of the date-inputfield at runtime then it might also be possible to set the firstDayOfWeek parameter...
regards,
Christian
Hi Christian,
Thanks for the information. You mean, it(date inputfield) depends on browser settings(locale)? or locale is defined at some other place? It seems we don't have calendar object...Is there any way to change the day of week or there is no other way to change it?
Thanks and Regards,
Teja
Hi Teja,
Thanks for the information. You mean, it(date inputfield) depends on browser settings(locale)? or locale is defined at some other place?
Indirectly - It depends on the configuration of your user/application. please refer to the documentation on: Sequence of Language Display - Developing Java Web Dynpro Applications - SAP Library .
Example:
This particular date picker depends on the locale of the user...so as far as i can say it is not possible to set the day of week directly (@ date inputfield) as you intend...
regards,
Christian
hi teja,
it seems that all arabic locales have the firstdayofweek set to saturday:
Arabic (United Arab Emirates):ar_AE: 7 : Saturday
Arabic (Iraq):ar_IQ: 7 : Saturday
Arabic (Yemen):ar_YE: 7 : Saturday
Arabic (Qatar):ar_QA: 7 : Saturday
Arabic (Saudi Arabia):ar_SA: 7 : Saturday
Arabic (Lebanon):ar_LB: 7 : Saturday
Arabic (Kuwait):ar_KW: 7 : Saturday
Arabic (Sudan):ar_SD: 7 : Saturday
Arabic (Syria):ar_SY: 7 : Saturday
Arabic (Bahrain):ar_BH: 7 : Saturday
Arabic (Tunisia):ar_TN: 7 : Saturday
Arabic (Jordan):ar_JO: 7 : Saturday
Arabic (Egypt):ar_EG: 7 : Saturday
Arabic (Morocco):ar_MA: 7 : Saturday
Arabic (Algeria):ar_DZ: 7 : Saturday
Arabic (Libya):ar_LY: 7 : Saturday
Arabic:ar: 7 : Saturday
Arabic (Oman):ar_OM: 7 : Saturday
regards,
christian
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.