Skip to content

Just 1 weekdata #842

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

Closed
StackHelp opened this issue Aug 2, 2018 · 16 comments
Closed

Just 1 weekdata #842

StackHelp opened this issue Aug 2, 2018 · 16 comments
Assignees

Comments

@StackHelp
Copy link

The version is 7.1.5

I want just 1-week data to show with 1 raw and therefore I tried this code with start date 2018-07-28 18:30:00 +0000 and end date is 2018-08-03 18:30:00 +0000

    let parameters = ConfigurationParameters(startDate: startDate,
                                             endDate: endDate,
                                             numberOfRows: 1,
                                             generateInDates: .forAllMonths,
                                             generateOutDates: .tillEndOfRow,
                                             hasStrictBoundaries: true)

But it doesn't work for me and gives data from 6th month of 2018. So how to show just 1 week of dates every week?

@patchthecode
Copy link
Owner

Does this help?
#581

@StackHelp
Copy link
Author

@patchthecode thanks for quick reply and I do try that but the issue is when I try to use start date as 018-07-28 18:30:00 +0000 means this week's first date to next all months but calendar starts from June that is the 6th month and one more issue is when month change, I got same dates for 2 scrolls. Please check link

https://www.dropbox.com/s/vli8zovaoq9pcwe/jtcalender%20issue.mov?dl=0

and here is code for configuration

             let parameters = ConfigurationParameters(startDate: startDate,
                                             endDate: endDate,
                                             numberOfRows: 1,
                                             generateInDates: .forAllMonths,
                                             generateOutDates: .tillEndOfRow,
                                             firstDayOfWeek: .monday,
                                             hasStrictBoundaries: false)

@patchthecode
Copy link
Owner

yes this is a limitation of this lib. As i have not coded partial dates yet.
It always start from the start of a month, and ends at the end of the month.

In the mean time you can setup some date boundary that the user cannot cross.
as shown here -> #365

@StackHelp
Copy link
Author

@patchthecode ok but in that video, I sent you in above comment has another problem that got same dates when month changes mean 2 weeks is been same when month changes check last 5-10 seconds video.

@patchthecode
Copy link
Owner

patchthecode commented Aug 6, 2018

I do not understand your last post. Can you please rephrase?

Also
Did you change your code to this?

ConfigurationParameters(
   startDate: startDate,
   endDate: endDate,
   numberOfRows: 1,
   generateInDates: .forFirstMonthOnly,
   generateOutDates: .off,
   hasStrictBoundaries: false)

@StackHelp
Copy link
Author

let parameters = ConfigurationParameters( startDate: startDate, endDate: Date().addMonth(1), numberOfRows: 1, generateInDates: .forAllMonths, generateOutDates: .tillEndOfRow, firstDayOfWeek: .monday, hasStrictBoundaries: false)

Yes, I tried now check this video, In this video week data start from Monday and that's ok but end with Tuesday because of month end but I want next months 1st and 2nd date to be filled there.

Now, I changed a property generateOutDates: .off with generateOutDates: .tillEndOfRow to display week data from Monday to Sunday and it works but now the issue is that I got same cells for 2 weeks when month changes like it show in this video

@patchthecode
Copy link
Owner

patchthecode commented Aug 10, 2018

ConfigurationParameters(
   startDate: startDate,
   endDate: endDate,
   numberOfRows: 1,
   generateInDates: .forFirstMonthOnly,  // <<<--- You Missed this ?
   generateOutDates: .off,
   hasStrictBoundaries: false)

@StackHelp
Copy link
Author

I need data for all the months from a current month without recurring issue that I mention in my previous comment

@StackHelp
Copy link
Author

@patchthecode hope you understand the issue

@patchthecode
Copy link
Owner

i do not understand. Can you join me here?

https://gitter.im/patchthecode/JTAppleCalendar

@StackHelp
Copy link
Author

yes

@StackHelp
Copy link
Author

@patchthecode hope you understand the issue

@patchthecode
Copy link
Owner

Is this still an issue?
closing this until user responds.

@StackHelp
Copy link
Author

Hii

@patchthecode
Copy link
Owner

Is this still an issue?

@patchthecode
Copy link
Owner

issue resolved via chat.
wrong parameter problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants