Comments (7)
This feature request is essentially asking for the behavioral change implemented in iOS 7.
from mbcalendarkit.
Same issue I am also getting, Did not understand your solution.
from mbcalendarkit.
There's no solution yet. It's a feature request. ;-)
from mbcalendarkit.
Related #120
from mbcalendarkit.
Related: #97
from mbcalendarkit.
Design Discussion
Behaviors
- Add a flag to the calendar view to turn this behavior on.
- Flag is off by default.
- If/when we implement scrolling gestures, enabling scrolling may also enable this flag.
- Assuming no drag-to-scroll for now.
- Setting selected date also sets visible date to the same value, always.
- Setting visible date also sets selected date, if the flag is disabled.
- A second date property
selectedDate
would be added to the calendar view model.
User Interaction
Defining the date
property as "selected date" and the new date used for display of a different time range as "visible date," here's a chart of user interaction to change the two values:
Legacy Behavior | New Behavior | |
---|---|---|
Change Visible Date | Single Tap | Tap Arrows or Scrub |
Change Selected Date | Single Tap | Tap Cell |
There are three options for the new behavior:
- Arrows in the header select change visible date, tapping cells change the selected date.
- Tapping on either the arrows or the cells change the visible date, and double tapping a cell changes selected date.
- Tapping the arrows or scrubbing changes the visible date, and tapping a cell changes the selected date.
The third is a more complete description of the third, and that's the behavior modeled in the chart. I'm going to give that a go.
Other Concerns
Some random thoughts:
- The UI is inherently designed for a single date to be both visible and selected, although scrubbing does behave similarly to scrubbing.
- Introducing a true scrolling or paging mode complicates this, because then we need to account for an entirely different set of user interactions. This would change the
UICollectionViewLayout
a little bit as well. - Right now, "panning" is implemented with
touchesBegan:
and friends, but as aUIGestureRecognizer
it would be easier to implement scrolling.
from mbcalendarkit.
Calendar Traversal Design, Part 2
Thinking about this some more, it looks like we also need to worry about minimum/maximum dates, and delegate callbacks.
Visible or Selected?
If the view model's current "date
" property is treated as "visibleDate
" and the new property is "selectedDate
" we need to decide if we duplicate the delegate methods for "visibleDate
" and "selectedDate
", and if not, which one fires when?
Missing Features
I think for now it might make sense to treat the "date
" as "selectedDate
" and add a "visibleDate
" property, so as to keep the delegate and minimum/maximum dates the same. This means that there's no way to tell when the user changes the visible date, and no way to clamp the visible months independently of clamping the selectable date range.
I think I need to think on this a little more.
from mbcalendarkit.
Related Issues (20)
- Bring `CustomCellProvider` to the HeaderView
- Cell Transition Animation Bug HOT 1
- Unit Test Cell Width Code
- CalendarView doesn't take in account firstDayOfWeek HOT 10
- Disable dragging on CustomCellProviding HOT 5
- Performance Profiling HOT 1
- Allow Custom Next/Back Images
- Month to Week Transition observable gap
- how refresh the data HOT 1
- how avoid show the tab bar HOT 1
- how to use background color in every sunday?
- Hello Project's Owner
- How to show more than one event in single date for MBCalendarKit for swift 4 HOT 1
- Changed it to NSCalendarIdentifierIslamic not working
- How to achieve calendar color customization? HOT 1
- How to change colors of calendar header, arrows, and selected cell?
- How to hide rows in Month display mode.
- Installing mBCalendarKit via Cocoapods is getting failed. HOT 1
- Calendar week view - pressing forwards/backwards buttons sometimes skips a week
- Tab Bar Text...
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 mbcalendarkit.