summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-05-19 01:06:25 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-05-19 01:06:25 +0000
commit0e20ec697b828fd3fd2e1987fff66d28df134365 (patch)
tree6e0f912859333c986c1c051a4cc033fc3e9c3fad /public/javascripts
parentcbb8b12ba44b39d42b1e2de3bfb415c7487c7b5b (diff)
downloadredmine-0e20ec697b828fd3fd2e1987fff66d28df134365.tar.gz
redmine-0e20ec697b828fd3fd2e1987fff66d28df134365.zip
set default issue start/due datepicker from due/start date (#14024)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11883 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/datepicker.js16
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);
+}