Modified the datepickerNow() function to return results without the time (just date). Updated the move_in datepicker to use it and added a link for the user.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@272 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-09 00:31:56 +00:00
parent 21aa2c1d26
commit 208aaaa504
2 changed files with 21 additions and 14 deletions

View File

@@ -145,17 +145,21 @@ function fmtCurrency(amount) {
//
// Datepicker helpers
function datepickerNow(id) {
function datepickerNow(id, usetime) {
now = new Date();
// datepicker seems to squash the time portion,
// so we have to pass in a copy of now instead.
$("#"+id).datepicker('setDate', new Date(now));
$("#"+id).val($("#"+id).val()
+ ' '
+ (now.getHours() < 10 ? '0' : '')
+ now.getHours() + ':'
+ (now.getMinutes() < 10 ? '0' : '')
+ now.getMinutes());
if (usetime == null)
usetime = true;
$("#"+id).val($("#"+id).val() +
(usetime
? (' '
+ (now.getHours() < 10 ? '0' : '')
+ now.getHours() + ':'
+ (now.getMinutes() < 10 ? '0' : '')
+ now.getMinutes())
: ''));
}
function datepickerSet(fromid, id, a, b) {