Skip to content

Commit

Permalink
Deprecate S3.start_end_date (defunct, option is now built-in to widget)
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Jun 30, 2015
1 parent 07c446b commit da117c8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
nursix-1.1.0-devel-2455-g3e2b528 (2015-06-30 14:06:48)
nursix-1.1.0-devel-2456-g07c446b (2015-06-30 14:06:45)
28 changes: 0 additions & 28 deletions static/scripts/S3/s3.datepicker.js
Expand Up @@ -28,34 +28,6 @@ $(document).ready(function() {
});
});

/* Function to ensure that end_date is always start-date or later */
S3.start_end_date = function(start_field, end_field) {
// This gets overridden by the widget when done from prep
// - need to instantiate from postp if we need this
var start_field = $('#' + start_field);
if (!start_field.length) {
// e.g. field isn't readable
return;
}
var end_field = $('#' + end_field);
if (!end_field.length) {
// e.g. field isn't readable
return;
}
var min = start_field.datepicker('getDate');
if (min) {
end_field.datepicker('option', 'minDate', min);
}
start_field.change(function() {
var min = start_field.datepicker('getDate');
end_field.datepicker('option', 'minDate', min);
var curr = end_field.datepicker('getDate');
if (curr && curr < min) {
end_field.datepicker('setDate', min);
}
});
};

// Automation of end date if start date is present and automation is allowed
// Widget Used: S3DateWidget
// Will be activated only if end_date_selector and start_date_selector are both used
Expand Down

0 comments on commit da117c8

Please sign in to comment.