Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.events.forEach((hook) => {
// Respect global callbacks registered via setDefault() method
let globalCallbacks = Flatpickr.defaultConfig[hook] || [];
// Inject our own method along with user callback
let localCallback = (...args) => {
this.$emit(camelToKebab(hook), ...args)
};
// Overwrite with merged array
safeConfig[hook] = arrayify(safeConfig[hook] || []).concat(globalCallbacks, localCallback);
});
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tuleap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tuleap. If not, see .
*/
import flatpickr from "flatpickr";
flatpickr.defaultConfig.prevArrow = "<i class="fa fa-angle-left"></i>";
flatpickr.defaultConfig.nextArrow = "<i class="fa fa-angle-right"></i>";
flatpickr.l10ns.default.firstDayOfWeek = 1;
export default datePicker;
function datePicker(element, options) {
if (isNaN(Date.parse(element.value))) {
element.value = null;
}
options = options || {};
options.weekNumbers = true;
options.dateFormat = "Y-m-d";
options.time_24hr = true;
options.monthSelectorType = "static";
let placeholder = "yyyy-mm-dd";
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tuleap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tuleap. If not, see .
*/
import flatpickr from "flatpickr";
flatpickr.defaultConfig.prevArrow = "<i class="fa fa-angle-left"></i>";
flatpickr.defaultConfig.nextArrow = "<i class="fa fa-angle-right"></i>";
flatpickr.l10ns.default.firstDayOfWeek = 1;
export default datePicker;
function datePicker(element, options) {
if (isNaN(Date.parse(element.value))) {
element.value = null;
}
options = options || {};
options.weekNumbers = true;
options.dateFormat = "Y-m-d";
options.time_24hr = true;
options.monthSelectorType = "static";
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tuleap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tuleap. If not, see .
*/
import flatpickr from "flatpickr";
flatpickr.defaultConfig.prevArrow = "<i class="fa fa-angle-left"></i>";
flatpickr.defaultConfig.nextArrow = "<i class="fa fa-angle-right"></i>";
flatpickr.l10ns.default.firstDayOfWeek = 1;
export function datePicker(
element: HTMLInputElement,
options?: flatpickr.Options.Options
): flatpickr.Instance {
if (isNaN(Date.parse(element.value))) {
element.value = "";
}
options = options || {};
options.weekNumbers = true;
options.dateFormat = "Y-m-d";
options.time_24hr = true;
options.monthSelectorType = "static";
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Tuleap is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tuleap. If not, see .
*/
import flatpickr from "flatpickr";
flatpickr.defaultConfig.prevArrow = "<i class="fa fa-angle-left"></i>";
flatpickr.defaultConfig.nextArrow = "<i class="fa fa-angle-right"></i>";
flatpickr.l10ns.default.firstDayOfWeek = 1;
export function datePicker(
element: HTMLInputElement,
options?: flatpickr.Options.Options
): flatpickr.Instance {
if (isNaN(Date.parse(element.value))) {
element.value = "";
}
options = options || {};
options.weekNumbers = true;
options.dateFormat = "Y-m-d";
options.time_24hr = true;
options.monthSelectorType = "static";