@syncfusion/ej2-calendars
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -57,3 +57,2 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.effect = ''; | ||
_this.disabledDays = []; | ||
_this.keyConfigs = { | ||
@@ -497,5 +496,2 @@ controlUp: 'ctrl+38', | ||
} | ||
if (args.date.getMonth() === this.currentDate.getMonth() && args.date.getFullYear() === this.currentDate.getFullYear()) { | ||
this.disabledDays.push(new Date(+args.date)); | ||
} | ||
} | ||
@@ -502,0 +498,0 @@ if (this.renderDaycellArg.isDisabled && !tdEle.classList.contains(SELECTED)) { |
export * from './calendar/index'; | ||
export * from './datepicker/index'; | ||
export * from './daterangepicker/index'; | ||
export * from './timepicker/index'; |
@@ -354,5 +354,26 @@ var __extends = (this && this.__extends) || (function () { | ||
}; | ||
TimePicker.prototype.currentTimeElement = function (value) { | ||
var element = undefined; | ||
if (!isNullOrUndefined(this.popupWrapper)) { | ||
var items = this.popupWrapper.querySelectorAll('.' + LISTCLASS); | ||
if (items.length) { | ||
for (var i = 0; i < items.length; i++) { | ||
if (this.timeCollections[i] >= +this.getDateObject(value)) { | ||
element = items[i]; | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
return element; | ||
}; | ||
TimePicker.prototype.setScrollPosition = function () { | ||
var listHeight = this.getPopupHeight(); | ||
var element = this.selectedElement; | ||
var element; | ||
if (isNullOrUndefined(this.value) && true) { | ||
element = this.currentTimeElement(new Date()); | ||
} | ||
else { | ||
element = this.selectedElement; | ||
} | ||
if (!isNullOrUndefined(element)) { | ||
@@ -425,2 +446,3 @@ var nextEle = element.nextElementSibling; | ||
this.initValue = this.valueWithMinutes = null; | ||
this.validateMinMax(this.value, this.min, this.max); | ||
this.disableTimeIcon(); | ||
@@ -617,5 +639,6 @@ } | ||
if (!this.strictMode) { | ||
var value = typeof val === 'string' ? this.createDateObj(val) : this.createDateObj(this.getFormattedValue(val)); | ||
var maxValue = this.createDateObj(this.getFormattedValue(this.initMax)); | ||
var minValue = this.createDateObj(this.getFormattedValue(this.initMin)); | ||
var value = typeof val === 'string' ? this.setCurrentDate(this.getDateObject(val)) : | ||
this.setCurrentDate(this.getDateObject(val)); | ||
var maxValue = this.setCurrentDate(this.getDateObject(this.initMax)); | ||
var minValue = this.setCurrentDate(this.getDateObject(this.initMin)); | ||
if (!isNullOrUndefined(this.checkDateValue(value))) { | ||
@@ -789,3 +812,3 @@ if ((+(value) > +(maxValue)) || (+(value) < +(minValue))) { | ||
TimePicker.prototype.previousState = function (date) { | ||
var value = this.setCurrentDate(date); | ||
var value = this.getDateObject(date); | ||
for (var i = 0; i < this.timeCollections.length; i++) { | ||
@@ -851,3 +874,3 @@ if (+value === this.timeCollections[i]) { | ||
var value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) : | ||
this.setCurrentDate(this.valueWithMinutes); | ||
this.getDateObject(this.valueWithMinutes); | ||
var timeVal = null; | ||
@@ -1066,3 +1089,3 @@ if (this.timeCollections.length === 0) { | ||
for (var i = 0; i < items.length; i++) { | ||
if (this.timeCollections[i] === +this.setCurrentDate(this.valueWithMinutes)) { | ||
if (this.timeCollections[i] === +this.getDateObject(this.valueWithMinutes)) { | ||
items[i].setAttribute('aria-selected', 'true'); | ||
@@ -1087,3 +1110,3 @@ this.selectedElement = items[i]; | ||
TimePicker.prototype.isValidLI = function (li) { | ||
return (li && li.classList.contains(LISTCLASS)); | ||
return (li && li.classList.contains(LISTCLASS) && !li.classList.contains(DISABLED)); | ||
}; | ||
@@ -1097,2 +1120,5 @@ TimePicker.prototype.createDateObj = function (val) { | ||
value = isNaN(+new Date(today + ' ' + val)) ? null : new Date(new Date(today + ' ' + val).setMilliseconds(0)); | ||
if (isNullOrUndefined(value)) { | ||
value = this.TimeParse(today, val); | ||
} | ||
} | ||
@@ -1126,4 +1152,4 @@ else { | ||
this.timeCollections = []; | ||
start = +(this.setCurrentDate(this.initMin).setMilliseconds(0)); | ||
end = +(this.setCurrentDate(this.initMax).setMilliseconds(0)); | ||
start = +(this.getDateObject(this.initMin).setMilliseconds(0)); | ||
end = +(this.getDateObject(this.initMax).setMilliseconds(0)); | ||
while (end >= start) { | ||
@@ -1130,0 +1156,0 @@ this.timeCollections.push(start); |
{ | ||
"name": "@syncfusion/ej2-calendars", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "Essential JS 2 Calendar Components", | ||
@@ -9,6 +9,7 @@ "author": "Syncfusion Inc.", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "^1.0.21", | ||
"@syncfusion/ej2-popups": "^1.0.17", | ||
"@syncfusion/ej2-inputs": "^1.0.21", | ||
"@syncfusion/ej2-base": "^1.0.22", | ||
"@syncfusion/ej2-popups": "^1.0.22", | ||
"@syncfusion/ej2-inputs": "^1.0.22", | ||
"@syncfusion/ej2-lists": "^1.0.19", | ||
"@syncfusion/ej2-buttons": "^1.0.22", | ||
"intl": "^1.2.5" | ||
@@ -15,0 +16,0 @@ }, |
@@ -11,2 +11,4 @@ # Calendar | ||
[DatePicker Documentation](http://ej2.syncfusion.com/documentation/datepicker) | ||
[DateRangePicker Demo](http://ej2.syncfusion.com/demos/#/daterangepicker/default.html) | ||
[DateRangePicker Documentation](http://ej2.syncfusion.com/documentation/daterangepicker) | ||
[TimePicker Demo](http://ej2.syncfusion.com/demos/#/timepicker/default.html) | ||
@@ -13,0 +15,0 @@ [TimePicker Documentation](http://ej2.syncfusion.com/documentation/timepicker) |
@@ -44,3 +44,2 @@ import { Component, Internationalization, EmitType } from '@syncfusion/ej2-base'; | ||
protected calendarElement: HTMLElement; | ||
protected disabledDays: Date[]; | ||
protected keyConfigs: { | ||
@@ -47,0 +46,0 @@ [key: string]: string; |
@@ -55,3 +55,2 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.effect = ''; | ||
_this.disabledDays = []; | ||
_this.keyConfigs = { | ||
@@ -495,5 +494,2 @@ controlUp: 'ctrl+38', | ||
} | ||
if (args.date.getMonth() === this.currentDate.getMonth() && args.date.getFullYear() === this.currentDate.getFullYear()) { | ||
this.disabledDays.push(new Date(+args.date)); | ||
} | ||
} | ||
@@ -500,0 +496,0 @@ if (this.renderDaycellArg.isDisabled && !tdEle.classList.contains(SELECTED)) { |
@@ -6,2 +6,3 @@ /** | ||
export * from './datepicker/index'; | ||
export * from './daterangepicker/index'; | ||
export * from './timepicker/index'; |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", "./calendar/index", "./datepicker/index", "./timepicker/index"], function (require, exports, index_1, index_2, index_3) { | ||
define(["require", "exports", "./calendar/index", "./datepicker/index", "./daterangepicker/index", "./timepicker/index"], function (require, exports, index_1, index_2, index_3, index_4) { | ||
"use strict"; | ||
@@ -10,2 +10,3 @@ function __export(m) { | ||
__export(index_3); | ||
__export(index_4); | ||
}); |
@@ -64,3 +64,3 @@ import { Internationalization } from '@syncfusion/ej2-base'; | ||
private isNavigate; | ||
private isPreventBlur; | ||
protected isPreventBlur: boolean; | ||
private prevValue; | ||
@@ -213,2 +213,3 @@ private inputStyle; | ||
private setWidth(); | ||
private currentTimeElement(value); | ||
private setScrollPosition(); | ||
@@ -215,0 +216,0 @@ private getText(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15005668
116
148204
18
6