From: Anthony Talarico Date: Tue, 10 Nov 2015 15:38:13 +0000 (-0500) Subject: Changing required depart dates X-Git-Tag: v1.0.0^2~311 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=f7afad15faaacef5e7d71c212963635c69fc4d0a;p=WP-Themes%2Fstaffords.git Changing required depart dates --- diff --git a/js/app.js b/js/app.js index aad10ee..c22ceb9 100644 --- a/js/app.js +++ b/js/app.js @@ -86,7 +86,11 @@ $(document).ready(function () { currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); currentDate.setDate(currentDate.getDate()); - d = currentDate.getDate() + 1; + dd = currentDate.getDate() + 1; + if (d <= 9) { + d = '0' + d; + } + d = currentDate.getDate(); if (d <= 9) { d = '0' + d; } diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index a51956a..8a5c35d 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -77,7 +77,11 @@ $(document).ready(function () { currentDate = new Date(currentDate); currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate()); currentDate.setDate(currentDate.getDate()); - d = currentDate.getDate() + 1; + dd = currentDate.getDate() + 1; + if (d <= 9) { + d = '0' + d; + } + d = currentDate.getDate(); if (d <= 9) { d = '0' + d; }