Ignore:
Timestamp:
Oct 7, 2008, 9:18:55 PM (16 years ago)
Author:
rub
Message:

jQuery Datepicker:

o use id for selector
o check radio button on change date

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/template/goto/element_set_unit.tpl

    r2674 r2680  
    5555        <label><input type="radio" name="date_creation_action-{$element.ID}" value="set" id="date_creation_action_set-{$element.ID}" /> {'set to'|@translate}</label>
    5656
    57         <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_day-{$element.ID}">
     57        <select id="date_creation_day-{$element.ID}" name="date_creation_day-{$element.ID}">
    5858                <option value="0">--</option>
    5959           {section name=day start=1 loop=32}
     
    6161           {/section}
    6262        </select>
    63         <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_month-{$element.ID}">
     63        <select id="date_creation_month-{$element.ID}" name="date_creation_month-{$element.ID}">
    6464          {html_options options=$month_list selected=$element.DATE_CREATION_MONTH}
    6565        </select>
    66         <input onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;"
     66        <input id="date_creation_year-{$element.ID}"
    6767               name="date_creation_year-{$element.ID}"
    6868               type="text"
     
    7070               maxlength="4"
    7171               value="{$element.DATE_CREATION_YEAR}" />
    72         <input name="date_creation_linked_date-{$element.ID}" type="hidden" size="10" disabled="disabled"/>
     72        <input id="date_creation_linked_date-{$element.ID}" name="date_creation_linked_date-{$element.ID}" type="hidden" size="10" disabled="disabled"/>
    7373        <script type="text/javascript">
    74           pwg_initialization_datepicker("select[name=date_creation_day-{$element.ID}]", "select[name=date_creation_month-{$element.ID}]", "input[name=date_creation_year-{$element.ID}]", "input[name=date_creation_linked_date-{$element.ID}]");
     74          pwg_initialization_datepicker("#date_creation_day-{$element.ID}", "#date_creation_month-{$element.ID}", "#date_creation_year-{$element.ID}", "#date_creation_linked_date-{$element.ID}", "#date_creation_action_set-{$element.ID}");
    7575        </script>
    7676      </td>
Note: See TracChangeset for help on using the changeset viewer.