parent
85dcee63ae
commit
358da00b15
|
@ -225,21 +225,19 @@ jQuery( function( $ ) {
|
|||
}).change();
|
||||
|
||||
// DATE PICKER FIELDS
|
||||
var dates = $( '.sale_price_dates_fields input' ).datepicker({
|
||||
defaultDate: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
numberOfMonths: 1,
|
||||
showButtonPanel: true,
|
||||
onSelect: function( selectedDate ) {
|
||||
var option = $( this ).is( '#_sale_price_dates_from, .sale_price_dates_from' ) ? 'minDate' : 'maxDate';
|
||||
|
||||
var instance = $( this ).data( 'datepicker' ),
|
||||
date = $.datepicker.parseDate(
|
||||
instance.settings.dateFormat ||
|
||||
$.datepicker._defaults.dateFormat,
|
||||
selectedDate, instance.settings );
|
||||
dates.not( this ).datepicker( 'option', option, date );
|
||||
}
|
||||
$( '.sale_price_dates_fields' ).each( function() {
|
||||
var dates = $( this ).find( 'input' ).datepicker({
|
||||
defaultDate: '',
|
||||
dateFormat: 'yy-mm-dd',
|
||||
numberOfMonths: 1,
|
||||
showButtonPanel: true,
|
||||
onSelect: function( selectedDate ) {
|
||||
var option = $( this ).is( '#_sale_price_dates_from, .sale_price_dates_from' ) ? 'minDate' : 'maxDate';
|
||||
var instance = $( this ).data( 'datepicker' );
|
||||
var date = $.datepicker.parseDate( instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings );
|
||||
dates.not( this ).datepicker( 'option', option, date );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// ATTRIBUTE TABLES
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue