rebeccaXam / XamForms.Controls.Calendar

Custom calendar control for Xamarin.Forms. Customizable border thickness, color, background colors and formats. Version 1.0.8 or lower Built against: 2.1.0.6521 Version 1.1.0 or above Built against: 2.3.4.231
MIT License
132 stars 69 forks source link

first letter of the day of the week #91

Open michelbahia opened 6 years ago

michelbahia commented 6 years ago

Is it possible to display only the first letter of the day of the week?

lubiepomaranczki commented 6 years ago

there is an option to specify "WeekdaysFormat". Unfortunately, when you look at the usage of it, you can see: start.ToString(WeekdaysFormat) where start is DateTime. As you may know, date formats don't support only first letter of a day.

If I were you, I would download the repo, add each project to your solution and update the method ChangeWeekdays() (line 170) to match your requirements.

michelbahia commented 6 years ago

I even did it, following your guidance. But now the background image on the special days does not appear as it appeared before, even when the image is set. :(

lubiepomaranczki commented 6 years ago

Not sure If I understood you correctly, but I've just checked on Android and it looks like this: Unfortunatelly, I've made a mistake and there is another method which updates the "Calendar". So what I did is: I changed ChangeWeekdays() method and ChangeCalendar(CalandarChanges changes). You can find the sample code in forked repo.

michelbahia commented 6 years ago

I did it, thank you very much for your help. Now for some reason the image that I assign the special dates does not appear in the calendar. Do you have any idea what that might be?

lubiepomaranczki commented 6 years ago

Hmm. Is there a chance for a sample repo? It will be easier to find out why this is happening 🙂

michelbahia commented 6 years ago

Actually the problem is that when I remove the package and copy and paste the project into git, it unconfigures several things including the image of the special date that does not appear

lubiepomaranczki commented 6 years ago

Strange. What I did is: clone the source code of this package -> remove the samples & windows phone dirs -> move the package folders to my solution folder -> add needed references (in iOS to iOS calendar, in Android for Android calendar etc.). It worked in my case and I was also having special dates with images. Don't know how to help you 🤔

michelbahia commented 6 years ago

success, I managed to solve: dancer: Now the only problem is that the image of the special date is always visible, even when it is from the previous month. For example: 31/10 is a special date and appears on the November calendar, should be visible only in the month of the date. :(

lubiepomaranczki commented 5 years ago

Sorry. I've missed your answer 😔 Yes I can see it in my calendar too, unfortunately, this is how the library works. It sucks, but this is how it is implemented. You can take a look at the code yourself and check if it is possible to change it. I can't promise if I have time in the next days to help you

michelbahia commented 5 years ago

I was able to resolve the code by refactoring! thank you!