PDA

View Full Version : [jasoncalendar] alter month list values



sami_c
03-07-2007, 06:56 AM
Hi,
I noticed that the month list value begins from 0 :
0 for Jan, 1 fot Feb ...

What should I do to have 01 for Jan, 02 for Feb ... 12 for Dec ?
thanx :D

ddadmin
03-07-2007, 09:17 AM
Warning: Please include a link to the DD script in question in your post, and also, post in the correct forum category. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a DD script question.

codeexploiter
03-07-2007, 09:38 AM
Hi,
I noticed that the month list value begins from 0 :
0 for Jan, 1 fot Feb ...

What should I do to have 01 for Jan, 02 for Feb ... 12 for Dec ?
thanx :D

Please provide a link as DD suggested so that it would be easy for the users to troubleshoot your problem.

Are you refering to this script (http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm)?

If yes do you want a date in the following format


07-03-2007

Month is the blue one.

You can achieve that using the following code (it is an example code used in the Jasons date input calender, the only important thing is the third parameter)


DateInput('orderdate', true, 'DD-MM-YYYY')

sami_c
03-07-2007, 04:42 PM
i'm sorry :o
yes i'm refering to this script :
http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm

i don't ask for how to change date format in the hidden field, but the months <select> tag begins from 0 !!
I use Web developper extension for firefox to have the generated source :

<select class="calendarDateInput" id="birth_date_Month_ID" onchange="birth_date_Object.changeMonth(this)">
<option value="0">Jan</option>
<option value="1">Feb</option>
<option value="2" selected="selected">Mar</option>
<option value="3">Apr</option>
<option value="4">May</option>
<option value="5">Jun</option>
<option value="6">Jul</option>
<option value="7">Aug</option>
<option value="8">Sep</option>
<option value="9">Oct</option>
<option value="10">Nov</option>
<option value="11">Dec</option>
</select>

i'm asking how can we have this :

<option value="1">Jan</option>
<option value="2">Feb</option>
...

or
<option value="01">Jan</option>
<option value="02">Feb</option>
...