diff options
Diffstat (limited to 'public/javascripts')
-rw-r--r-- | public/javascripts/datepicker.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/javascripts/datepicker.js b/public/javascripts/datepicker.js new file mode 100644 index 000000000..9acae0cd4 --- /dev/null +++ b/public/javascripts/datepicker.js @@ -0,0 +1,16 @@ +function beforeShowDatePicker(input, inst) { + var default_date = null; + switch ($(input).attr("id")) { + case "issue_start_date" : + if ($("#issue_due_date").size() > 0) { + default_date = $("#issue_due_date").val(); + } + break; + case "issue_due_date" : + if ($("#issue_start_date").size() > 0) { + default_date = $("#issue_start_date").val(); + } + break; + } + $(input).datepicker("option", "defaultDate", default_date); +} |