This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/assets/javascripts/datetimepicker.js

33 lines
850 B
JavaScript

$(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('');
// });
});