Comments (17)
Is it a duplicate of #34?
from calendarkit.
No..I want to set 8AM the default start time of calendar for each day. If user want to see above and below time, he can scroll up and down.
from calendarkit.
Would scrollTo
method of the dayView
solve your issue?
https://github.com/richardtop/CalendarKit/blob/master/Sources/DayView.swift#L140
Just try using it like this:
dayView.scrollTo(hour24: 8, animated: true/false)
Let me know if this is an appropriate solution to your problem
from calendarkit.
yes its work..but when we click on another date ..its automatically shift to 12:00 AM.
from calendarkit.
but when we click on another date
- this is a limitation of the CalendarKit, as it doesn't preserve the scroll position when you click on the date in the header. Already reported as #211- One workaround would be to invoke the
dayView.scrollTo(hour24: 8, animated: true/false)
method just afterdayView.didMoveToDate
delegate callback: https://github.com/richardtop/CalendarKit/blob/master/Sources/DayViewController.swift#L106 - let me know if this solution works for you.
from calendarkit.
yes, when i try to write scroll code in this method its working.. but their some jerk ...means its first show 12:00 for some millisecond then directly move to 8:00 AM
from calendarkit.
Could you please attach a video? Thanks
from calendarkit.
Screen.Recording.2023-02-27.at.3.56.14.PM.mov
Plz check in this video
from calendarkit.
And the exact code you're using for this? Maybe try using 'willMoveTo' instead of 'didMoveTo'? Let me know if there is any difference.
If this doesn't help, I'll convert this ticket to an enhancement.
from calendarkit.
No , when i move that line to willMoveTo..then nothing are happing.
from calendarkit.
And do you use animated:false
with didMoveTo
?
from calendarkit.
yes on didMoveTo and same on willMoveTo.
from calendarkit.
Ok, I've changed this to enhancement. Would you be willing to make relevant changes to the CalendarKit to implement this feature?
I can briefly explain how to achieve this functionality.
from calendarkit.
yes if you will help me..i will make changes.
from calendarkit.
Looks like this will need quite a big refactoring to make it posible. Unfortunately, CK doesn't keep the scroll position in the case of selecting a date via the header.
Please take a look at this code, as you see, the scrollToFirstEventIfNeeded()
is executed on completion, so there will be some animation going on:
https://github.com/richardtop/CalendarKit/blob/master/Sources/Timeline/TimelinePagerView.swift#L446
I suggest for your case just use the method I've suggested, but with the animated:true
parameter. It won't make it unnoticeable, although it will make the interface feel a bit more pleasing.
from calendarkit.
oky..let me check this one..Thanks
from calendarkit.
Please keep me updated on whether you resolve this issue either by my suggestion or by any other means...
from calendarkit.
Related Issues (20)
- Is there any option to show a specific Holiday on the Calendar??
- A blank area pop up after clicking cancel bar button in EKEventViewController HOT 1
- "isHeaderViewVisible" only hide the subview without resizing the timelinePageViewer HOT 1
- How to get data asynchronously data for eventsForDate from server api? HOT 1
- Event has no starDate or endDate HOT 4
- Quick question about Nav Bar Please Check Attached ss HOT 4
- Stuck HOT 4
- App Crashes HOT 4
- Event text cutoff in timeline view for short events HOT 2
- Padding and corner radius to event view? (ios 13+ style) HOT 1
- Delegate called twice: dayView(dayView: DayView, didUpdate event: EventDescriptor) HOT 5
- How to align "non-overlapped" events on 1 column? HOT 1
- Current time indicator for all dates. HOT 6
- Drag problem HOT 3
- Navigation bar turns black HOT 1
- Horizontal scrolling for the timeline HOT 1
- Visual shading representation of unavailable hours HOT 1
- When events are overlap , delegate method is called for least event HOT 1
- Use DateComponents instead of Date to coordinate between multiple modules
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 calendarkit.