cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically calling the date picker.

Former Member
0 Kudos

Hi Experts,

I need to use the date picker dynamically.

Please let me know how to approach.

Thanks,

Jay.

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

hi,

i am not clear with ur requirements .

for creating a inputField with date dynamically use the below code in the Domodify method.

IWDInputField input = view.createElement(IWDInputField.class,"inp");

input.setLength(20);

input.bindValue("DynamicNode.input");

here DynamicNode is the ContextNode and input is the Attribute of the Node with type as "DATE".

Thanks and regards,

Fistae

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Ayyaparaj

I have created datepicker dynamically using the code

IWDInputField input = (IWDInputField)view.createElement( IWDInputField.class, "input");

input.bindValue( wdContext.getNodeInfo().addAttribute( "Atrib", "ddic:com.sap.dictionary.date"));

IWDTransparentContainer cont = (IWDTransparentContainer)view.getElement( "RootUIElementContainer");

cont.addChild( input);

for this date picker i need to change the date representation

pls help me

Thanks

jay

Former Member
0 Kudos

Hi ,

you can use any one option to change date format to dd-mm-yyyy

1) Chagne the Language in to English UK in UME

2) Change Language to English UK

ControlPanel - >Regional Options(desktop setting)

Regards,

Sunitha Hari

Former Member
0 Kudos

Hi,

Try




IWDInputField input = (IWDInputField)view.createElement( IWDInputField.class, "input");
input.bindValue( wdContext.getNodeInfo().addAttribute( "Atrib", "ddic:com.sap.dictionary.date"));

*IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute( "Atrib");*
*attributeInfo.getDataAttribute().getScalarType().format("dd/MM/yyyy");*

IWDTransparentContainer cont = (IWDTransparentContainer)view.getElement( "RootUIElementContainer");
cont.addChild( input);

Regards

Ayyapparaj

Former Member
0 Kudos

Modification in representing the value(display format) selected in the date picker.

former_member201361
Active Contributor
0 Kudos

hi,

for representing the date format , u can give the format in the dictionary data Type , as u will bind the inputField to the Context Attribute (make the type as Dictionary Date object where u can give the format for Date in the external Representation).

thanks abd regards

Fistae

Former Member
0 Kudos

Hello Jay,

You can solve this problem by setting the browser language setting to en-gb, that will get you to display the date in DD-MM-YYYY

Please try to find any option long date in application that solve the problem of DD-MONTH-YYYY...

You can view the entire format of date from the control panel->Regional and language option, where it shows all the format including long date and short date display for each locale.

Hope this will help you.

Regards

Vinod V

Former Member
0 Kudos

Hi Experts,

I got my problem resolved.

But I need some modification to be done in this.

When we select the any value from the date picker, it is being displayed in YYYY/MM/DD value.

Is there any possibility to display that in DD-MONTH-YYYY fornmat ??

Thanks for your time.

Most Cordially,

Jay.

Former Member
0 Kudos

Hi,

use as follows

Format formatter = new SimpleDateFormat("dd/MM/yyyy");

String s = formatter.format(date);

or else use the dictionary type and specify the format.

Regards

Ayyapparaj

Former Member
0 Kudos

Thanks all. My issue is closed.

Regards,

Jay.

Former Member
0 Kudos

Hi

Try this code in wdDoModifyView


IWDInputField input = (IWDInputField)view.createElement( IWDInputField.class, "input");
input.bindValue( wdContext.getNodeInfo().addAttribute( "Atrib", "ddic:com.sap.dictionary.date"));
IWDTransparentContainer cont = (IWDTransparentContainer)view.getElement( "RootUIElementContainer");
cont.addChild( input);

Regards

Vinod V

Former Member
0 Kudos

What does that mean?

Armin