Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set start date of DHTML Calendar Widget

Status
Not open for further replies.

Tracey

Programmer
Oct 16, 2000
690
NZ
Hi all

I use the DHTML Calendar Widget by Mihai Bazon.

I have a requirement to set the available date-range start date on this calendar, basically stopping people from selecting a date before 9/9/04. I need to do this only for some pages.

I have tried using Calendar.setRange but i think i am doing something wrong. the script i have tried is below

Code:
<script type="text/javascript">
                 Calendar.setup(
                 {
                     inputField  : "from",      // ID of the input field
                     ifFormat    : "dd/mm/y",    // the date format
                     button      : "trigger1"    // ID of the button
                 });
                 Calendar.setRange(2004, 2050);
             </script>

also, it doesnt appear that this is going to enable me to limit entry to 9/9/04, only the year, so is probably not what i need anyway.

Does anyone here have experience with setting range on this widget?

Tracey
Remember... True happiness is not getting what you want...

Its wanting what you have got!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top