1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Calendar Input

Discussion in 'JavaScript' started by whirlybird20, Jul 4, 2008.

  1. #1
    whirlybird20, Jul 4, 2008 IP
  2. =Messa=

    =Messa= Peon

    Messages:
    104
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to modify calendarDateInput.js file.

    Replace this @ lines 568-583:

             writeln('<select class="calendarDateInput" id="' + DateName + '_Month_ID" onChange="' + DateName + '_Object.changeMonth(this)">');
             if (!Required) {
                var NoneSelected = (DefaultDate == '') ? ' selected' : '';
                writeln('<option value=""' + NoneSelected + '>' + UnselectedMonthText + '</option>');
             }
             for (var i=0;i<12;i++) {
                MonthSelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.monthIndex') == i)) ? ' selected' : '';
                writeln('<option value="' + i + '"' + MonthSelected + '>' + MonthNames[i].substr(0,3) + '</option>');
             }
             writeln('</select>' + String.fromCharCode(13) + '</td>' + String.fromCharCode(13) + '<td valign="middle">');
             writeln('<select' + InitialStatus + ' class="calendarDateInput" id="' + DateName + '_Day_ID" onChange="' + DateName + '_Object.changeDay(this)">');
             for (var j=1;j<=eval(DateName + '_Object.picked.dayCount');j++) {
                DaySelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.day') == j)) ? ' selected' : '';
                writeln('<option' + DaySelected + '>' + j + '</option>');
             }
             writeln('</select>' + String.fromCharCode(13) + '</td>' + String.fromCharCode(13) + '<td valign="middle">');
    Code (markup):
    With this @ lines 568-583:

             writeln('<select' + InitialStatus + ' class="calendarDateInput" id="' + DateName + '_Day_ID" onChange="' + DateName + '_Object.changeDay(this)">');
             for (var j=1;j<=eval(DateName + '_Object.picked.dayCount');j++) {
                DaySelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.day') == j)) ? ' selected' : '';
                writeln('<option' + DaySelected + '>' + j + '</option>');
             }
             writeln('</select>' + String.fromCharCode(13) + '</td>' + String.fromCharCode(13) + '<td valign="middle">');
             writeln('<select class="calendarDateInput" id="' + DateName + '_Month_ID" onChange="' + DateName + '_Object.changeMonth(this)">');
             if (!Required) {
                var NoneSelected = (DefaultDate == '') ? ' selected' : '';
                writeln('<option value=""' + NoneSelected + '>' + UnselectedMonthText + '</option>');
             }
             for (var i=0;i<12;i++) {
                MonthSelected = ((DefaultDate != '') && (eval(DateName + '_Object.picked.monthIndex') == i)) ? ' selected' : '';
                writeln('<option value="' + i + '"' + MonthSelected + '>' + MonthNames[i].substr(0,3) + '</option>');
             }
             writeln('</select>' + String.fromCharCode(13) + '</td>' + String.fromCharCode(13) + '<td valign="middle">');
    Code (markup):
     
    =Messa=, Jul 4, 2008 IP
    whirlybird20 likes this.
  3. whirlybird20

    whirlybird20 Guest

    Messages:
    462
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank You!
     
    whirlybird20, Jul 5, 2008 IP