Skip to content

Commit

Permalink
Compile files
Browse files Browse the repository at this point in the history
  • Loading branch information
benitolopez committed Jun 2, 2024
1 parent 727c14c commit 1969eae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion dist/js/hotel-datepicker.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hotel-datepicker 4.8.0 - Copyright 2024 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */
/*! hotel-datepicker 4.9.0 - Copyright 2024 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */
import * as fecha from 'fecha';

let idCounter = 0;
Expand Down Expand Up @@ -41,6 +41,7 @@ class HotelDatepicker {
this.clearButton = opts.clearButton || false;
this.submitButton = Boolean(this.inline && opts.submitButton);
this.submitButtonName = this.submitButton && opts.submitButtonName ? opts.submitButtonName : "";
this.closeOnScroll = opts.closeOnScroll || false;
this.i18n = opts.i18n || {
selected: "Your stay:",
night: "Night",
Expand Down Expand Up @@ -360,6 +361,11 @@ class HotelDatepicker {

// Listen for focus
document.addEventListener("focus", evt => this.checkOnFocus(evt), true);

// Close datepicker on scroll
if (this.closeOnScroll) {
window.addEventListener("scroll", evt => this.closeDatepicker(evt));
}
}
generateId() {
// Generate an unique ID for each datepicker
Expand Down
8 changes: 7 additions & 1 deletion dist/js/hotel-datepicker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! hotel-datepicker 4.8.0 - Copyright 2024 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */
/*! hotel-datepicker 4.9.0 - Copyright 2024 Benito Lopez (http://lopezb.com) - https://github.com/benitolopez/hotel-datepicker - MIT */
var HotelDatepicker = (function (fecha) {
'use strict';

Expand Down Expand Up @@ -61,6 +61,7 @@ var HotelDatepicker = (function (fecha) {
this.clearButton = opts.clearButton || false;
this.submitButton = Boolean(this.inline && opts.submitButton);
this.submitButtonName = this.submitButton && opts.submitButtonName ? opts.submitButtonName : "";
this.closeOnScroll = opts.closeOnScroll || false;
this.i18n = opts.i18n || {
selected: "Your stay:",
night: "Night",
Expand Down Expand Up @@ -380,6 +381,11 @@ var HotelDatepicker = (function (fecha) {

// Listen for focus
document.addEventListener("focus", evt => this.checkOnFocus(evt), true);

// Close datepicker on scroll
if (this.closeOnScroll) {
window.addEventListener("scroll", evt => this.closeDatepicker(evt));
}
}
generateId() {
// Generate an unique ID for each datepicker
Expand Down
4 changes: 2 additions & 2 deletions dist/js/hotel-datepicker.min.js

Large diffs are not rendered by default.

0 comments on commit 1969eae

Please sign in to comment.