-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Initial Dates #153
Comments
Do you mean selection of multiple dates at once? |
@aleksanderwozniak yes. Do you have any way to achieve this image below ? |
Ah I see... Unfortunately there is no built-in support for multiple date selection at this moment. I will be adding it in the future. |
So What I did show multiple selected dates was to add the selected dates to events, and then modify the markersBuilder to display as if the date was selected. |
@LenvZyl that sounds great. Could you please share with us the code of your implementation? |
I have added multiple selection in Here is how it works. You can use either multi-selection by tapping on individual dates, or you can select a continuous range of dates by tapping on a startDate and endDate.
To use multi-selection:
* Actually, a Here is a complete example containing all of this. To use range selection:
* Range selection can be toggled on/off by longpressing a day cell in TableCalendar. When range selection mode is on, tapping will return ranges ( Here is a simple example. Here is a bit more complex example, starting in To use table_calendar:
git:
url: git://github.com/aleksanderwozniak/table_calendar.git
ref: 3.0.0-beta |
@aleksanderwozniak Thank you very much for this feature! I really needed this. I was looking into the beta branch and I noticed a lot of breaking changes. For example the CalendarController is now missing, the events list has been replaced with the eventLoader, the styling has been moved to one single object. I was wondering if there is a changelog available for this update, so I can see what the entirety of the update looks like before updating to the new version. Thank you! |
@mees-brenzie Although it may seem like migrating would require a lot of work, it actually should be a rather straightforward and quick process. Many concepts from previous versions still apply, but are used in more flexible and performant ways. Here is a list of some key features I thought were worth mentioning. You will find a list of most important API modifications underneath it. Key features:
Key modifications:
|
Null safe 3.0.0 prerelease has been uploaded to pub.dev: https://pub.dev/packages/table_calendar/versions/3.0.0-nullsafety.0 |
Before, onCalendarCreated returns the first day, last day. But now it returns a PageController. but there is no function or property in the page controller to get the first day and last day. Is this possible? And ... the readme is fairly lacking. it does not mention about onVisibleDaysChanged and how to migrate to the new one. |
Your question was already asked in #441.
As mentioned in #265 (comment), |
Thank you @aleksanderwozniak for such a detailed comment, explaining almost everything. One function that was very important to my app was Thanks, |
I have few a questions
|
@vytautas-pranskunas- Let me try and reply to both questions, @aleksanderwozniak can correct me.
|
Is it also possible to set multiple Range selection with this plugin? |
Points 1. and 2. have been pretty much covered by @MrJai, you can additionally check #441 (comment). For point 3. refer to your original issue: #492 (comment)
Yes, but you will need to write your custom logic using onDaySelected and CalendarBuilders. All available examples are here. |
Thanks but I don't want to select ranges through onDaySelected. The ranges should already be selected from the beginning. |
@desmeit The basic concept is as follows: builder will give you a DateTime object called |
@desmeit Did you eventually succeed implementing it? If yes, would you mind sharing your code? I'm currently trying to implement the same. I eventually implemented it myself. You can now select multiple date ranges in the same calendar. For anyone interested a working code snippet below (@aleksanderwozniak I don't know if many people try to implement his, if so, maybe you can link this somewhere, might be useful for others.):
|
Hi, |
Are there any work arounds for Multiple Initial dates
The text was updated successfully, but these errors were encountered: