diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2014-03-05 08:06:43 -0500 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2014-03-05 08:06:43 -0500 |
commit | eedfe4be0ae5d9e8399b1de52e7b4a3fdb2b22ac (patch) | |
tree | e2b51dabba4efdb771e3d36ded28fff3a3f38da6 /src/jquery-ui-timepicker-addon.js | |
parent | 7740c23bf1a8f60bb971bf67ce818d4543572ebb (diff) | |
download | jQuery-Timepicker-Addon-eedfe4be0ae5d9e8399b1de52e7b4a3fdb2b22ac.zip jQuery-Timepicker-Addon-eedfe4be0ae5d9e8399b1de52e7b4a3fdb2b22ac.tar.gz jQuery-Timepicker-Addon-eedfe4be0ae5d9e8399b1de52e7b4a3fdb2b22ac.tar.bz2 |
#633 - add timeOnlyShowDate option to show the date but only allow timepicker
Diffstat (limited to 'src/jquery-ui-timepicker-addon.js')
-rw-r--r-- | src/jquery-ui-timepicker-addon.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jquery-ui-timepicker-addon.js b/src/jquery-ui-timepicker-addon.js index 6dfcdcc..25f9c74 100644 --- a/src/jquery-ui-timepicker-addon.js +++ b/src/jquery-ui-timepicker-addon.js @@ -54,6 +54,7 @@ this._defaults = { // Global defaults for all the datetime picker instances showButtonPanel: true, timeOnly: false, + timeOnlyShowDate: false, showHour: null, showMinute: null, showSecond: null, @@ -903,9 +904,9 @@ // return; //} - if (this._defaults.timeOnly === true) { + if (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === false) { formattedDateTime = this.formattedTime; - } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { + } else if ((this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) || (this._defaults.timeOnly === true && this._defaults.timeOnlyShowDate === true)) { formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix; } |