cancel
Showing results for 
Search instead for 
Did you mean: 

Calendar in web dynpro

Former Member
0 Kudos

Hi all,

I want to display calendar beside my input field for date.

This input field will be displaying date as mm/dd/yyyy from the data taken from sql database.

The user should be able to click on the calendar and change the dates to something else.

How can I implement this in webDynpro?

Thanks

Anjana

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Anjana,

Why do you need to two controls one input field and date conrol? Map your input control to context element, type as date. Here you can show your data base date and if you want modify to some thing else you can select date from date control.

Hope it is clear to you. There are so many examples in SDN to convert date to java.sql.Date and set it to the Input field.

Regards,

Sridhar

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I think the solutions given above are right. Please close your thrad if answered.

Regards,

Gaurav

Former Member
0 Kudos

Hi all,

Thanks for your suggestions.

I was able to solve my problem using the SimpleDateFormat.

Converted date to sql.Date and set it to value attribute of type date.

Thanks

Anjana

Former Member
0 Kudos

Hello Anjana,

The date is taken from Backend right? If so; you can directly specify the date field from backend and map that to an InputField UI Element; The default date format of WebDynpro os MM/DD/YYYY; so you don;t have to modify the date format; if you want to modify them then use the SimpleDateFormat().

Regards

- Vinod

*

Former Member
0 Kudos

Just use a standard input field that is mapped to a context element of type date. It will automatically provide you with a date selection icon.

HTH.

Former Member
0 Kudos

Hi,

U have a date type field 'd' in table 't' . Hope you have done modeling i,e Jco connections etc.

Now when you apply template for root ui element > form> select that field d --> finish .

You can observe directly the field with the date type with a date picker.

If you want intially the date to be displayed , call the execute......method the table in the init() by passing

appropriate field as input to fetch the correct date . It will be of sql date.

Thanks ,

Srini