Comments (13)
Sorry for the late reply, I'm just getting on to implementing this functionality, and it doesn't seem to be working as I would like.
I want to set the current date to today... but allow the user to scroll back to select a day in the past.
The calendar timeline always starts on the current date.
See line 58 in date_picker_timeline.dart
DateTime _date = DateTime.now().add(Duration(days: index));
from datepickertimelineflutter.
Hi @mrwwalmsley, if you want the date to start at some previous time, then you can just pass that date to the constructor.
DatePickerTimeline(
DateTime.now(),
onDateChange: (date) {
// New date selected
print(date.day.toString());
},
),
Instead of date.now()
you can pass any date and the calendar will start from that particular date.
from datepickertimelineflutter.
Hi @mrwwalmsley, can you confirm if this resolves your issue?
from datepickertimelineflutter.
I am closing this issue.
from datepickertimelineflutter.
Any update on this? Can this PR #12 get merged in please?
from datepickertimelineflutter.
I had no time to implement this, #12 have it implemented, you can use that version until it gets merged.
dependencies:
date_picker_timeline:
git:
url: https://github.com/psygo/DatePickerTimelineFlutter.git
from datepickertimelineflutter.
I tried to pass the date like this DateTime.now().add(Duration(days: -10)
to get the last week, but still see future dates.
from datepickertimelineflutter.
@HannHank Did you find a fix for this?
from datepickertimelineflutter.
@Mallington nope, still facing that problem.
from datepickertimelineflutter.
@HannHank I have posted a fix here: https://github.com/Mallington/DatePickerTimelineFlutter. You can modify your pubspec.yaml to use:
date_picker_timeline:
git:
url: https://github.com/Mallington/DatePickerTimelineFlutter
I'd recommend forking the repository for long term use, just in case I delete it 😄
from datepickertimelineflutter.
@Mallington thanks 👍
from datepickertimelineflutter.
@HannHank There was an issue with my original commit. I have moved to setting the startDate in the constructor
See Example:
DatePickerTimeline(
DateTime.now().add(Duration(days: -10)),
onDateChange: (date) {
// New date selected
print(date.day.toString());
},
startDate: DateTime.now().add(Duration(days: -10)),
daysCount: 10,
)
from datepickertimelineflutter.
Hi everyone, this option is now added to the library, just specify the startDate
and the calendar will start from that particular date. I have also added a controller to move to any specific date.
from datepickertimelineflutter.
Related Issues (20)
- SelectedTextColor was responding to user's entry
- Enable previous month HOT 3
- Multiple date selection
- Bottom Overflowed by 4.0 Pixel on Small Device
- Unselected card style
- Animate to page not working on iOS
- Add widget into date
- Is this project dead ? HOT 3
- why don't you do focus center when date clicked? HOT 1
- when i move to date with animateToDate, selection color still remain. How can I fix it? HOT 1
- Show dates in reverse order HOT 1
- Scroll doesn't work in desktop windows HOT 1
- The contents text color of the DatePicker(day, date, month) dont react to night(dark) mode
- error with new verison of intl package HOT 4
- Left padding without clipping?
- Can we deactivate all the future dates from next month? HOT 1
- /removed
- Current date without focus HOT 2
- Add support to display Holidays Integration to Calendar Timeline Flutter.
- This Date Picker dependancy not working on latest flutter version 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 datepickertimelineflutter.