How to use the ilib/DateFactory function in ilib

To help you get started, we’ve selected a few ilib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enactjs / enact / packages / moonstone / DatePicker / DatePickerController.js View on Github external
updateValue = (value) => {
		const newValue = DateFactory(value).getTime();

		this.setState({
			value: newValue
		});

		return newValue;
	}
github enactjs / enact / packages / moonstone / TimePicker / TimePickerController.js View on Github external
updateValue = (value) => {
		const newValue = DateFactory(value).getTime();
		this.setState({
			noHourAnimation: !this.shouldAnimateHour(value),
			value: newValue
		});

		return newValue;
	}
github enactjs / enact / packages / moonstone / DatePicker / DatePickerController.js View on Github external
toIDate (time) {
		if (time && this.locale) {
			return DateFactory({
				unixtime: time,
				timezone: 'local'
			});
		}
	}
github enactjs / enact / packages / moonstone / TimePicker / TimePickerController.js View on Github external
toIDate (time) {
		if (time && this.locale) {
			return DateFactory({
				timezone: 'local',
				unixtime: time
			});
		}
	}