0

Good Day!

I am trying to use Syncfusion Calendar Plugin in my Xamarin Forms project. Everything is working fine, except rendering blackout dates. This is the documentation for this plugin. The problem is when I create new DateTime object, for example new DateTime(2016, 10, 28), and render calendar it restricts not 28 October, but 28 September, i.e. 10th month is September.

I also can't resrict dates in January because it should be 0, but in DateTime there is an index reference error.

Does anybody know the solution for this problem?

Noel Evans
  • 8,113
  • 8
  • 48
  • 58
Ork
  • 11
  • 3
  • This is a by-design of Android, or, say java. http://stackoverflow.com/questions/344380/why-is-january-month-0-in-java-calendar – Nathan Oct 19 '16 at 16:12
  • You can manually convert it though. Like new DateTime(yyyy, MM-1, dd). -_- – Nathan Oct 19 '16 at 16:13
  • Thanks, Nathan, but Xamarin uses C# as a basic language. Months are enumerated from 1 to 12 in C#. Also I can't convert it manually, cause DateTime(2016, 0, 28) throws an "Index out of range exception". – Ork Oct 20 '16 at 05:38
  • Wait, Java? The Forms project and the plugin are C#, at what point is the Java date coming in? Also if your trouble was the zero-based months, then your sample date should be rendered as November, no? Can you elaborate? – rdoubleui Oct 20 '16 at 05:57

1 Answers1

0

This is the bug with SfCalendar component. The fix will be included in upcoming Volume 3 Service pack 1 release which is expected to be rolled out by the end of October 2016.

Now you can use this patch to fix this problem http://syncfusion.com/Installs/support/patch/14.3.0.49/861963/165865/SyncfusionPatch_14.3.0.49_861963_10202016024734117_165865.zip

Ork
  • 11
  • 3