User should be able to select always 7 days in C1Calendar in C#

Posted by: C_S.Kalaivanan on 13 February 2019, 7:46 pm EST

    • Post Options:
    • Link

    Posted 13 February 2019, 7:46 pm EST

    Hi,

    In C1Shecule ViewType is WeekView(7 days). By setting MaxSelectionCount property to 7 in C1Calendar selection not exceeding more than 7 days, but in same way selecting less than 7 days should not be allowed. Please guide me to achieve this functionality.

  • Posted 15 February 2019, 1:57 am EST

    Hello,

    Please find attached sample application and share with me whether it works fine for you.

    Thanks,

    Ruchir

    C1ScheduleDemo.zip

  • Posted 18 February 2019, 12:14 am EST

    Hi,

    Thanks for the reply. Its not working for me. Am able to select less than 7 days in the C1Calendar control.

  • Posted 18 February 2019, 5:48 pm EST

    Hello,

    I further tested the application and have made few modifications to it. Now, at my end I am never able to select less than 7 days (see attached video). For modified application, please refer attached sample application.

    c1Calendar1.MaxSelectionCount = 7;
    

    private void C1Calendar1_SelectionChanged(object sender, SelectionChangedEventArgs e)

    {

    if(e.Selection.Length<7)

    {

    c1Schedule1.ViewType = ScheduleViewEnum.WeekView;

    }


    }

    Thanks,
    Ruchir
    [zip filename="MinSelectionCount_workaround.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-cd91d990-4859-4d43-ab40-a5ab3d5ba5ed.zip[/zip][img]https://gccontent.blob.core.windows.net/forum-uploads/file-d49150a1-dd3b-47cf-a782-90c295d294de.gif[/img]
  • Posted 18 February 2019, 11:29 pm EST

    Hi,

    Thanks for resolving the issue. Its working for me.

Need extra support?

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

Learn More

Forum Channels