[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - calendar cannot choose day 8 or month 8 (August) ???
Advertisement

calendar cannot choose day 8 or month 8 (August) ???

Moderators: Calcifer, slothy

calendar cannot choose day 8 or month 8 (August) ???

Postby smak » Tue Sep 11, 2007 11:43 pm

this is a weird bug but the calendar doesn't seem to be able to pass a chosen month (August) or a chosen day (8th) of any month, back to a drop down input box selection.

the example at dtmlgoodies has the same problem
http://www.dhtmlgoodies.com/scripts/js_ ... endar.html

see date input 4 and 6. try choosing with the calendar any date in august, or september 8th, october 8th etc and you'll see what i mean...

my javascript is not good enough to fix this, and i don't want to waste all my time having customised this script (for now), so i hope to hear from someone soon!
smak
 
Posts: 1
Joined: Tue Sep 11, 2007 11:22 pm

Postby sakisg » Wed Oct 24, 2007 6:08 pm

This a great script but except the day 8 you cannot choose and the day 9 even in the demo of the site. Everything else is working great.
Can someone post a fix for this? :cry:
sakisg
 
Posts: 1
Joined: Wed Oct 24, 2007 5:57 pm

fix pickdate

Postby leoniglio » Tue Dec 18, 2007 2:51 pm

Hello, i thank for the calendar that is simply the best on the net.

I solved this bug by replacing function pickDate in dhtmlgoodies_calendar.js file with this one:

function pickDate(e,inputDay)
{
var month = currentMonth/1 +1;
if(month<10)month = '0' + month;
var day;
if(!inputDay && this)day = this.innerHTML; else day = inputDay;
if(day/1<10)day = '0' + day;
if(returnFormat){
returnFormat = returnFormat.replace('dd',day);
returnFormat = returnFormat.replace('mm',month);
returnFormat = returnFormat.replace('yyyy',currentYear);
returnFormat = returnFormat.replace('hh',currentHour);
returnFormat = returnFormat.replace('ii',currentMinute);
returnFormat = returnFormat.replace('d',day/1);
returnFormat = returnFormat.replace('m',month/1);

returnDateTo.value = returnFormat;
try{
returnDateTo.onchange();
}catch(e){

}
}else{
for(var no=0;no<returnDateToYear.options.length;no++){
if(returnDateToYear.options[no].value==currentYear){
returnDateToYear.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToMonth.options.length;no++){
if(returnDateToMonth.options[no].value==parseInt(month,10)){
returnDateToMonth.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToDay.options.length;no++){
if(returnDateToDay.options[no].value==parseInt(day,10)){
returnDateToDay.selectedIndex=no;
break;
}
}
if(calendarDisplayTime){
for(var no=0;no<returnDateToHour.options.length;no++){
if(returnDateToHour.options[no].value==parseInt(currentHour,10)){
returnDateToHour.selectedIndex=no;
break;
}
}
for(var no=0;no<returnDateToMinute.options.length;no++){
if(returnDateToMinute.options[no].value==parseInt(currentMinute,10)){
returnDateToMinute.selectedIndex=no;
break;
}
}
}
}
closeCalendar();

}
Last edited by leoniglio on Tue Dec 18, 2007 4:58 pm, edited 1 time in total.
leoniglio
 
Posts: 1
Joined: Tue Dec 18, 2007 2:43 pm

Thanks!

Postby locusi » Tue Jun 17, 2008 2:55 pm

locusi
 
Posts: 1
Joined: Tue Jun 17, 2008 2:52 pm


Return to Calendar script questions

Who is online

Users browsing this forum: No registered users and 2 guests

cron