It is cool http://tarruda.github.io/bootstrap-datetimepicker/ I am using...

I do like

$('#ExpectedEndingTimeDataPicker').mouseover(function () {
     $("#ExpectedEndingTimeDataPicker").datepicker();
});

But no joy... it is showing when click the input tag only...

HTML

<input class="form-control dataPickerField valid" 
       data-val="true" 
       data-val-required="The Expected Ending Time field is required." 
       id="ExpectedEndingTimeDataPicker" 
       name="Requsition.ExpectedEndingTimeAsString" 
       readonly="True" type="text" value="17.01.2014">
有帮助吗?

解决方案

According to the documentation (github link), use

$('#ExpectedEndingTimeDataPicker').data("DateTimePicker").show();

inside your mouseover handler.

其他提示

$('#ExpectedEndingTimeDataPicker').mouseover(function () {
     $(this).data('daterangepicker').show();
});

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top