How to apply a function to two elements?
<p>I have two elements <code>#DateTimeStart</code>, <code>#DateTimeEnd</code>, I would like apply my  <code>datetimepicker</code> to both.</p>

<p>With this code I cannot have the result.. any idea what I am doing wrong here?</p>

<pre><code>$(document).ready(function () {
    // This does not work
    $('#DateTimeStart', '#DateTimeEnd').datetimepicker({
        addSliderAccess: true,
        sliderAccessArgs: { touchonly: false }
    });
});
</code></pre>

<p>What I am trying to achieve is like but with less code </p>

<pre><code>// This code works
$(document).ready(function () {
    $('#DateTimeStart').datetimepicker({
        addSliderAccess: true,
        sliderAccessArgs: { touchonly: false }
    });  
    $('#DateTimeEnd').datetimepicker({
        addSliderAccess: true,
        sliderAccessArgs: { touchonly: false }
    });
});
</code></pre>
