10 examples of 'ng-pick-datetime' in JavaScript

Every line of 'ng-pick-datetime' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
50select(date: Date) {
51 // Get the selected date from the date/time pickers.
52 // This date would be local to the timezone that was selected,
53 // so it must first be offsetted back to UTC.
54 this.$emit('input', date.getTime() - this.tzOffset);
55}
374function getPickDateTemplate() {
375 return ''
376 + '<div>'
377 + '<div>'
378 + '<div>'
379 + ''
380 + '<i></i>'
381 + '<a href><i></i></a>'
382 + '</div>'
383 + '<div>'
384 + '<table>'
385 + '<thead>'
386 + '<tr>'
387 + '<th><a><i></i> </a></th>'
388 + '<th><div></div></th>'
389 + '<th> <a><i></i> </a> </th>'
390 + '</tr>'
391 + '<tr>'
392 + '<th></th>'
393 + '</tr>'
394 + '</thead>'
395 + '<tbody>'
396 + '<tr>'
397 + '<td>'
398 + '<div></div>'
399 + '</td>'
400 + '</tr>'
401 + '</tbody>'
402 + '</table>'
403 + '</div>'
404 + '</div>'
405 + '<div>'
406 + '<ul>'
407 + '<li><div>{{item.label}}</div></li>'
408 + '</ul>'
409 + '<div>'
410 + 'Apply '
411 + 'Cancel'
412 + '</div>'
413 + '</div>'
414 + '</div>';
415}
109public setDay(date:number):void {
110 this.dateTime = moment(this.dateTime).date(date).format(this.dateTimeFormat);
111}
102ngOnChanges() {
103 this.parseValueString();
104}
55onStartChange(date: Date): void {
56 this.startValue = date;
57}
66ngOnChanges(changes: SimpleChanges): void {
67 if (changes.hasOwnProperty('time') &amp;&amp; this.datePickerElement) {
68 this.setTime(changes.time.currentValue);
69 }
70}
12gotoDate() {
13 this.date = new Date(2005, 10, 9);
14}
30public get dateTime(): string {
31 return new this.dateTimeFormat(this.locale, {
32 month: 'short',
33 weekday: 'short',
34 day: '2-digit',
35 }).format(this.selectedDate);
36}
43public ngOnChanges( changes: SimpleChanges ): void {
44 if (this.mode === 'inline' &amp;&amp;
45 changes['dateTimePicker'] &amp;&amp;
46 !changes['dateTimePicker'].isFirstChange()) {
47 this.dialog.setSelectedMoment(this.dateTimePicker);
48 }
49}
253setValue(date: moment.Moment) {
254 this.value = date ? new DateModel(date, this.options.format) : new DateModel();
255 this.generateCalendar();
256}

Related snippets