DHTMLX Docs & Samples Explorer

### Attach Calendar to several text inputs

You can attach one calendar instance to a several text inputs.

Click in a text fild |  |

Source

    <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcalendar.css">
    <script>window.dhx_globalImgPath = "../../codebase/imgs/";</script>
    <script type="text/javascript" src="../../codebase/dhtmlxcommon.js"></script>
    <script type="text/javascript" src="../../codebase/dhtmlxcalendar.js"></script>
    <script>var mCal;
    window.onload = function() {
        mCal = new dhtmlxCalendarObject(['calInput1', 'calInput2', 'calInput3']);
    }</script>

    <table >
       <tr>
    <td><strong>Click in a text fild</strong><br />
            <input type="text" id="calInput1" style="width: 200px; font-size:12px;" readonly="readonly">
        </td>
    <td valign="bottom">
      <input type="text" id="calInput2" style="width: 200px; font-size:12px;" readonly="readonly">
    </td>
    <td valign="bottom">
      <input type="text" id="calInput3" style="width: 200px; font-size:12px;" readonly="readonly">
    </td>
      </tr>
    </table>
    <br>