From 953402b1c745160a744914ddacdb1c3dda0b30d5 Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Sat, 1 Sep 2012 08:12:43 +0000 Subject: [PATCH] * code for task#893. --- module/user/js/todo.js | 9 +++++++++ module/user/view/todo.html.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/module/user/js/todo.js b/module/user/js/todo.js index 12e9e0d29d..5655fe9dce 100644 --- a/module/user/js/todo.js +++ b/module/user/js/todo.js @@ -2,3 +2,12 @@ function changeDate(date) { location.href = createLink('user', 'todo', 'account=' + account + '&type=' + date.replace(/\-/g, '')); } + +startDate = new Date(1970, 1, 1); +$(".todo-date").datePicker({createButton:true, startDate:startDate, maxDate:'%y-%M-%d'}) +.dpSetPosition($.dpConst.POS_TOP, $.dpConst.POS_LEFT) +.bind('click', function() { + $(this).dpDisplay(); + this.blur(); + return false; +}); diff --git a/module/user/view/todo.html.php b/module/user/view/todo.html.php index d12f16c0fb..19504eed8a 100644 --- a/module/user/view/todo.html.php +++ b/module/user/view/todo.html.php @@ -27,7 +27,7 @@ echo html::a(inLink('todo', "account=$account&type=future"), $lang->todo->futureTodos) . '
'; echo html::a(inLink('todo', "account=$account&type=all"), $lang->todo->allDaysTodos) . '
'; echo html::a(inLink('todo', "account=$account&type=before"), $lang->todo->allUndone) . '
'; - echo html::input('date', $date, "class='w-date date' onchange=changeDate(this.value)"); + echo html::input('date', $date, "class='w-date todo-date' onchange=changeDate(this.value)"); ?>