Comments (3)
Special minDate value "today"
was only getting parsed in init()
.
Obviously, "today"
is not a valid date string so updating current month/year set those values to NaN.
I moved parsing to buildDays instead
from flatpickr.
Incorporated into latest release
from flatpickr.
let editModeOnTimeout = setTimeout(() => {
var x = new Flatpickr(document.getElementById("paid_start_date"),{static:true,enableTime:true,minuteIncrement:15,time_24hr:true,minDate:this.paidData.data.start_time,maxDate:this.paidData.data.end_time,onChange:function(selectedDates:any,dateStr:any,instance:any){
this.paidData.data.start_time = dateStr;
y.config.minDate = this.paidData.data.start_time;
}.bind(this)});
var y = new Flatpickr(document.getElementById("paid_end_date"),{static:true,enableTime:true,minuteIncrement:15,time_24hr:true,minDate:this.paidData.data.start_time,maxDate:this.paidData.data.end_time,onChange:function(selectedDates:any,dateStr:any,instance:any){
this.paidData.data.end_time = dateStr;
x.config.maxDate = this.paidData.data.end_time;
}.bind(this)});
});
this is my setup of datepickr in angular2 and I'm getting same error when I try to scroll up the month.
My setup:
Angular: 2.4.10
mozilla firefox 52.0.2 32 bit
from flatpickr.
Related Issues (20)
- parseDate does not throw error for invalid dates when allowInput HOT 1
- Auto-Focus minutes after inserted hours
- Turn off auto close?
- Feature Request: When using altFormat, internally also copy the "style" attribute contents to created element
- valueChange on keyDown in datetime time input HOT 1
- Bug Report: Cannot getDate when using allowInput and allowInvalidPreload
- Bug Report: with altInput & alFormat, the created input does not extract and use all the class names HOT 1
- minDate set via instance.set(), calendar open on second time all dates are disabled
- current month forced to update when showMonths > 1
- Flatpickr does not receive focus if altInput is enabled
- Broken Links npmcdn.com HOT 1
- Documentation points to wrong CDN
- Request for Consideration: Show Current Time when user first clicks to Select Date Time
- when we select startDate and same endDate it only shows startDate in mode range. any solution to this
- Method expression is not of Function type
- [Error] current cdn path is error, HOT 15
- hebrew translation of rangeSeperator is not good
- Inputs with custom placeholder as value throw validation error during opening and closing calendar popup HOT 1
- DefaltDate + 10 days HOT 1
- When ‘noCalendar’ is set to false, the dates in June change to July. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flatpickr.