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/lib/datetimepicker/datetimepicker.js

33 lines
850 B
JavaScript
Raw Permalink Normal View History

2013-01-08 21:18:16 +00:00
$(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');
}
}
2013-01-08 21:18:16 +00:00
$(this).siblings('input').val($(this).find('input').val() + ' ' + $(this).siblings('div').find('input').val());
});
// $('.date_picker').on("changeDate",function(){
// $(this).find('input').val('');
// });
2013-01-08 21:18:16 +00:00
});