Lines Matching refs:date
27 // Store values for reverting inputs when the user's date/time is invalid.
31 // safe minimum date.
35 // Set the max date to the min date plus 20 years.
39 // Make sure the ostensible date is within this range.
46 $('date').setAttribute('min', this.toHtmlValues_(this.minDate_).date);
47 $('date').setAttribute('max', this.toHtmlValues_(this.maxDate_).date);
63 $('date').addEventListener('blur', this.onTimeBlur_.bind(this), false);
80 * Updates the date/time controls to the current local time.
88 if (document.activeElement.id != 'date' &&
91 this.prevValues_.date = $('date').value = htmlValues.date;
108 var date = $('date').valueAsDate;
109 date.setMilliseconds(date.getMilliseconds() + $('time').valueAsNumber);
112 date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
114 var seconds = Math.floor(date / 1000);
119 * Called when focus is lost on date/time controls.
168 * Builds date and time strings suitable for the values of HTML date and
170 * @param {Date} date The date object to represent.
171 * @return {{date: string, time: string}} Date is an RFC 3339 formatted date
175 toHtmlValues_: function(date) {
178 var localDate = new Date(date);
179 localDate.setMinutes(date.getMinutes() - date.getTimezoneOffset());
180 return {date: localDate.toISOString().slice(0, 10),