I have two elements #DateTimeStart
, #DateTimeEnd
, I would like apply my datetimepicker
to both.
With this code I cannot have the result.. any idea what I am doing wrong here?
$(document).ready(function () {
// This does not work
$('#DateTimeStart', '#DateTimeEnd').datetimepicker({
addSliderAccess: true,
sliderAccessArgs: { touchonly: false }
});
});
What I am trying to achieve is like but with less code
// This code works
$(document).ready(function () {
$('#DateTimeStart').datetimepicker({
addSliderAccess: true,
sliderAccessArgs: { touchonly: false }
});
$('#DateTimeEnd').datetimepicker({
addSliderAccess: true,
sliderAccessArgs: { touchonly: false }
});
});