Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Limiting calendar choices

Avatar

Level 3

Is there a way to display a calendar from a date/time field that is limited to 6 months from the current date? I am creating an order form for food products and I would like the user to only be able to choose a date that is within 6 months from the current date.

Thanks.

6 Replies

Avatar

Level 10

Hi,

This example might get you started, but it'll only work for static forms. http://cookbooks.adobe.com/post_An_alternative_Date_Picker_for_LiveCycle_Designer-18455.html

Otherwise I think you are out of luck.

Regards

Bruce

Avatar

Level 7

If you are using a dynamic form you cannot stop the calendar from going to any date but you can use the Date2Num function in the exit event to clear the calendar and give a message if someone enters a date outside the range you want.

Avatar

Level 3

I'm a newbie as far as Livecycle / Javascript is concerned - are you able to expand on the code required to make this work?

Thanks for your help.

Avatar

Level 3

Thanks - that is what I want the field to do, but if I want the cutoff date to change according to the 'current date' (within 6 months from when the form is opened), how does that work?

Avatar

Level 7

To get the current date you use:

Date2Num(date(), "DD/MM/YY")