2024-01-07 15:48:22 -05:00
|
|
|
{{include file="field_input.tpl" field=$field}}
|
2018-03-04 08:56:51 -05:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2018-02-03 09:53:45 -05:00
|
|
|
$(function () {
|
|
|
|
$('#id_{{$field.0}}').datetimepicker({
|
|
|
|
step: 5,
|
|
|
|
format: '{{$datetimepicker.dateformat}}',
|
|
|
|
{{if $datetimepicker.minDate}}
|
|
|
|
minDate: new Date({{$datetimepicker.minDate->getTimestamp()}} * 1000),
|
|
|
|
yearStart: {{$datetimepicker.minDate->format('Y')}},
|
|
|
|
{{/if}}
|
|
|
|
{{if $datetimepicker.maxDate}}
|
|
|
|
maxDate: new Date({{$datetimepicker.maxDate->getTimestamp()}} * 1000),
|
|
|
|
yearEnd: {{$datetimepicker.maxDate->format('Y')}},
|
|
|
|
{{/if}}
|
|
|
|
{{if $datetimepicker.defaultDate}}
|
|
|
|
defaultDate: new Date({{$datetimepicker.defaultDate->getTimestamp()}} * 1000),
|
|
|
|
{{/if}}
|
|
|
|
dayOfWeekStart: {{$datetimepicker.firstDay}},
|
|
|
|
lang: '{{$datetimepicker.lang}}'
|
|
|
|
});
|
2018-03-04 08:56:51 -05:00
|
|
|
{{if $datetimepicker.lang}}
|
|
|
|
jQuery.datetimepicker.setLocale('{{$datetimepicker.lang}}');
|
|
|
|
{{/if}}
|
|
|
|
|
2018-02-03 09:53:45 -05:00
|
|
|
{{if $datetimepicker.minfrom }}
|
|
|
|
$('#id_{{$datetimepicker.minfrom}}').data('xdsoft_datetimepicker').setOptions({
|
|
|
|
onChangeDateTime: function (currentDateTime) {
|
|
|
|
$('#id_{{$field.0}}').data('xdsoft_datetimepicker').setOptions({minDate: currentDateTime});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
{{/if}}
|
|
|
|
{{if $datetimepicker.maxfrom }}
|
|
|
|
$('#id_{{$datetimepicker.maxfrom}}').data('xdsoft_datetimepicker').setOptions({
|
|
|
|
onChangeDateTime: function (currentDateTime) {
|
|
|
|
$('#id_{{$field.0}}').data('xdsoft_datetimepicker').setOptions({maxDate: currentDateTime});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
{{/if}}
|
|
|
|
})
|
|
|
|
</script>
|