orbit-4-2/app/assets/javascripts/lib/datetimepicker/datetimepicker.js

33 lines
850 B
JavaScript
Raw Normal View History

$(document).ready(function(){
$('.date_picker').datetimepicker({
pickTime: false
});
$('.default_picker').datetimepicker();
$('.time_picker').datetimepicker({
pickDate: false
});
$('.separated_picker div').on("changeDate",function(){
if ($(this).hasClass('date_picker'))
{
if ($(this).find('input').val() && $(this).siblings('div').css('pointer-events'))
{
$(this).siblings('div').css('pointer-events', '');
}
else
{
$(this).siblings('div').find('input').val(null);
$(this).siblings('div').css('pointer-events', 'none');
}
}
$(this).siblings('input').val($(this).find('input').val() + ' ' + $(this).siblings('div').find('input').val());
});
// $('.date_picker').on("changeDate",function(){
// $(this).find('input').val('');
// });
});