You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have given max days 350 . So for today max date in my calendar is 4th -5th oct . If i am selecting these date and again opening calendar sending same date as props its not scrolling to that date. Though if i scroll manually date are selected.
@Ashishlog9 it not supports auto scrolling to selected date when first rendering now, you can calculate the position of selected dates and scroll to there in the componentDidMount lifecycle function
It has auto scroll enabled with it . If i am selecting any other month in stead of last monnth shown in calender then its working fine but in case of last month its creating issue . Please help i am stuck in this.
Sharing the code of scroll in library.
_scrollToSelecetdMonth() {
if (this._sv) {
let monthIndex = this.getMonthIndex()
let layout = monthLayoutArr[monthIndex]
setTimeout(() => {
this._sv && this._sv.scrollTo({
x: 0,
y: layout.y - 50,
animated: true
});
}, 100);
}
}
I have given max days 350 . So for today max date in my calendar is 4th -5th oct . If i am selecting these date and again opening calendar sending same date as props its not scrolling to that date. Though if i scroll manually date are selected.
<DraggableCalendar
ref={(_) => (this._calendar = _)}
onSelectionChange={this.onSelectionChange}
maxDays={350}
initialSelectedRange={[this.state.initialStartDate, this.state.initialEndDate]}
fullDateRange={this.props.initialDates != undefined ? true : false}
/>
The text was updated successfully, but these errors were encountered: