C1DateEdit1 wrong week number

Posted by: saidnai on 7 June 2023, 11:29 pm EST

    • Post Options:
    • Link

    Posted 7 June 2023, 11:29 pm EST - Updated 7 June 2023, 11:34 pm EST

    Hello,

    I have an issue with the C1DateEdit1 4.8, it shows the wrong week number. Is there something to adjust in the properties to get the right week number?

    attached C1DateEdit1 picture / calendar from Outlook.

    Thanks

    Said

  • Posted 8 June 2023, 4:23 am EST

    Hi Said,

    The week number is dependent on the rule being used to determine the first week of the year. These rules are defined in the System.Globalization.CalendarWeekRule Enum and you can use the C1DateEdit.Calendar.CalendarWeekRule property to set these rules. You can also find the same rules defined in the Windows’ Calendar app as well (see WindowsCalendarApp.zip )

    Setting the below code will match the C1DateEdit week numbers with the ones shown in your outlook.

    C1DateEdit1.Calendar.CalendarWeekRule = Globalization.CalendarWeekRule.FirstFullWeek

    Thanks, and Best Regards,

    Kartik

  • Posted 9 June 2023, 4:59 am EST

    Dear Kartik,

    Perfect.

    Best regards

    Said

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels