pickadate

Requiring pickadate.js with Browserify

拜拜、爱过 提交于 2020-01-16 03:39:09
问题 I would like to use the responsive pickadate.js date picker in my Backbone.js application. I am using Browserify to manage modules and dependencies and wondering how to integrate pickadate. I started with a npm install pickadate which added the node module to my project. Then, in one of my views, I try this: var pickadate = require('pickadate'); this.$el.find('input[name=dateEntry]').pickadate(); The error is on the second line which throws this error: [Error] TypeError: 'undefined' is not a

Disable dates in pickadate-picker and refresh it

徘徊边缘 提交于 2019-12-18 06:08:11
问题 I try to disable some dates after I have initialised the Date Picker. I am initialising the picker like this: $( document ).ready(function() { $('#inputDatetime').pickadate({ format: 'dd. mmmm yyyy', formatSubmit: 'yyyy-mm-dd', min: dt, selectYears: 2, selectMonths: true }); }); The user now performs some action that triggers an onChange() event. The disableDates() function prepares some more dates to disable and sets it to the picker using the set method: function disableDates() { var

Angular 2 Component - modelbinding is not working

和自甴很熟 提交于 2019-12-13 07:25:54
问题 I'm trying to build a wrapper for pickatime (pickadate) in angular 2 but the modeldata is not changing when I select a time. My wrapper-component looks like this: import {Component, AfterContentInit, Input, EventEmitter, ElementRef} from 'angular2/core'; @Component({ selector: 'mundo-timepicker', template: ` <input class="form-control" (click)="onClick()" [(value)]="zeit" /> ` }) export class MundoTimepickerComponent implements AfterContentInit { @Input() zeit: any; pickerConfig: Pickadate

How can I consolidate pickadate initializer for multiple inputs on one page?

我与影子孤独终老i 提交于 2019-12-11 07:41:53
问题 I have a page that has multiple inputs for pickadate and pickatime. How can I consilidate the jquery to where I have one call for pickadate and one call for pickatime ? Here is the markup. <div class="container"> <div class="row"> <div class="col-xs-3"> <div class="form-group"> <label><span class="required">*</span> Display Start Date</label> <input type="text" class="form-control select-date display-start-date" required> <i id="trigger1" class="calendar-icon"></i> </div> </div> <div class=

Change time in day date picker depending on location/day

与世无争的帅哥 提交于 2019-12-11 00:04:09
问题 I'm using amsul date selector and a time selector, I want to change the min/max hours of the time selector depending on what days and check boxes are selected. Here is my code: var today = new Date(); var tomorrow = new Date(); tomorrow.setDate(today.getDate()+1); var nextyear=new Date(); nextyear.setFullYear(nextyear.getFullYear()+1); pickupdatemin=new Date(document.getElementById('car-rental-pickup-date').value); const timepicker = $('#car-rental-pickup-time').pickatime({ clear: '', min: [9

Serious performance issue when using remodal and pickadate on Safari

我们两清 提交于 2019-12-08 17:11:29
问题 I was trying to use remodal together with pickadate so I can create a date-picker and time-picker from within the modal. On first trial I found out the datepicker would be hidden by the remodal, as shown below. To overcome this issue I created a .full-screen class for my remodal. .remodal { &.full-screen { max-width: none; height: 100%; width: 100%; margin: 0 auto; } } It then works perfectly fine in Chrome, as shown: Then I get to test the site on my iOS, and I found out the overlay is

How to force npm to use the jquery 2.1.1

不想你离开。 提交于 2019-12-05 22:47:20
问题 I am asking this question as a beginner on node-npm. My current node_modules has a query version 2.2.0. But in the same project i am using materialize-css which has a datepicker component. This component runs on jquery 2.1.1. My question is simple. How can i remove the current jquery [v 2.2.0] from my node_modules and install jquery version [2.1.1] so that the datepicker component works. 回答1: Add the specific version to your package.json file "dependencies": { "jquery": "2.1.1" } 回答2: You can

How to force npm to use the jquery 2.1.1

只谈情不闲聊 提交于 2019-12-04 04:58:35
I am asking this question as a beginner on node-npm. My current node_modules has a query version 2.2.0. But in the same project i am using materialize-css which has a datepicker component. This component runs on jquery 2.1.1. My question is simple. How can i remove the current jquery [v 2.2.0] from my node_modules and install jquery version [2.1.1] so that the datepicker component works. Add the specific version to your package.json file "dependencies": { "jquery": "2.1.1" } You can use the npm CLI to install the dependency directly without changing the dependencies yourself in package.json by

Disable dates in pickadate-picker and refresh it

雨燕双飞 提交于 2019-11-29 10:42:49
I try to disable some dates after I have initialised the Date Picker . I am initialising the picker like this: $( document ).ready(function() { $('#inputDatetime').pickadate({ format: 'dd. mmmm yyyy', formatSubmit: 'yyyy-mm-dd', min: dt, selectYears: 2, selectMonths: true }); }); The user now performs some action that triggers an onChange() event. The disableDates() function prepares some more dates to disable and sets it to the picker using the set method: function disableDates() { var disabledDays = []; $.ajax({ url: 'partners/getInactiveDays', dataType: 'json', async: false, success: