Problem after hiding Saturday and Sunday checkboxes of Weekly Recurrence in RadScheduler

9 posts, 0 answers
  1. Tiffany Phan
    Tiffany Phan avatar
    17 posts
    Member since:
    Feb 2007

    Posted 17 May 2011 Link to this post

    <%@ Page Language="VB"AutoEventWireup="false"CodeFile="Default.aspx.vb"Inherits="_Default"%> 
        
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    <head runat="server"
        <title></title> 
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1"runat="server"/> 
    </head> 
    <body> 
        <form id="form1"runat="server"
        <telerik:RadScriptManager ID="RadScriptManager1"runat="server"
            <Scripts> 
                <%--Needed for JavaScript IntelliSense in VS2010--%> 
                <%--ForVS2008 replace RadScriptManager with ScriptManager--%> 
                <asp:ScriptReference Assembly="Telerik.Web.UI"Name="Telerik.Web.UI.Common.Core.js"/> 
                <asp:ScriptReference Assembly="Telerik.Web.UI"Name="Telerik.Web.UI.Common.jQuery.js"/> 
                <asp:ScriptReference Assembly="Telerik.Web.UI"Name="Telerik.Web.UI.Common.jQueryInclude.js"/> 
            </Scripts> 
        </telerik:RadScriptManager> 
        
        <script type="text/javascript"
            //Put your JavaScript code here. 
                function OnClientFormCreated(sender, eventArgs)  
                
                    $telerik.$(".rsAdvWeekly_WeekDays li:first-child").hide(); 
                    $telerik.$(".rsAdvWeekly_WeekDays li:last-child").hide();                                                  
        
                }   
                    
                function OnClientRecurrenceActionDialogShowing(sender, eventArgs)  
                
                     eventArgs.set_cancel(true); 
                        //Edit this instance only: 
                        //eventArgs.set_editSeries(false); 
                            
                        //Edit the entire series: 
                     eventArgs.set_editSeries(true); 
                }      
        </script> 
        
        <telerik:RadAjaxManager ID="RadAjaxManager1"runat="server">         
        </telerik:RadAjaxManager> 
           
        <div> 
            <telerik:RadScheduler ID="RadScheduler1"runat="server"Skin="Office2007"DataEndField="EndDate"
                DataKeyField="ID"DataRecurrenceField="RecurrenceRule"DataRecurrenceParentKeyField="RecurrenceParentID"
                DataSourceID="ldsActivitySchedules"DataStartField="StartDate"DataSubjectField="Subject"
                OnClientFormCreated="OnClientFormCreated()"OnClientRecurrenceActionDialogShowing="OnClientRecurrenceActionDialogShowing"
                AllowDelete="False" 
                EnableCustomAttributeEditing="True"FirstDayOfWeek="Monday" 
                LastDayOfWeek="Friday"MinutesPerRow="15"ShowAllDayRow="False"Width="700px"Height="650px"
                <TimelineView UserSelectable="False"/> 
                <AdvancedForm EnableCustomAttributeEditing="True"Modal="True"/> 
                <ResourceTypes> 
                    <telerik:ResourceType DataSourceID="ldsActivities"ForeignKeyField="ActivityID" 
                        KeyField="ID"Name="Activities"TextField="Description"/> 
                </ResourceTypes> 
            </telerik:RadScheduler> 
            <asp:LinqDataSource ID="ldsActivities"runat="server" 
                ContextTypeName="DataClassesDataContext"EnableInsert="True" 
                EnableUpdate="True"OrderBy="Description"TableName="ACTIVITies"
            </asp:LinqDataSource> 
            <asp:LinqDataSource ID="ldsActivitySchedules"runat="server"ContextTypeName="DataClassesDataContext"
                EnableInsert="True"EnableUpdate="True"OrderBy="StartDate"TableName="ACTIVITYSCHEDULEs"
            </asp:LinqDataSource> 
        </div> 
        </form> 
    </body> 
    </html>
    Hi Veronica,

    Sorry for the delay.

    Per your request, I created a new support thread and pasted the full code of my default.aspx page here again. 
    To answer your question, I used Internet Explorer version 7.0.5730.13 to run my application.
    Also, I used RadScheduler version 2010.3.1109.35, and this caused this issue when I tried to hide Saturday and Sunday checkboxes.

    Hope you can help me to solve this problem.

    Thanks so much for your hard work.

    Tiffany Phan

  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 18 May 2011 Link to this post

    Hi Tiffany Phan,

    Thank you for the provided info as well as the code.
     
    I was finally able to reproduce the issue. "Thursday" comes on the row below because it has style="clear: left". You need to remove this style and the recurrence panel will look OK. Here's the code for this:

    $telerik.$(".rsAdvWeekly_WeekDays li:nth-child(5)").css("clear","");

    Please let me know if this was helpful.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Tiffany Phan
    Tiffany Phan avatar
    17 posts
    Member since:
    Feb 2007

    Posted 18 May 2011 Link to this post

    Veronica,

    Bravo!  Awesome!  It works :-)
    Thank you so much.  Very helpful!

    Just to let you know that the other day I had a training to show my people how to use the application which my co-worker and I designed.  We used all Telerik controls in our project.
    The people really like it.

    Thanks and have a wonderful day!

    Tiffany Phan
  4. Tiffany Phan
    Tiffany Phan avatar
    17 posts
    Member since:
    Feb 2007

    Posted 18 May 2011 Link to this post

    Hi Veronica,

    One more thing.  How can I uncheck Saturday and Sunday checkboxes of Weekly Reccurence before I hide them?
    The reason is that whenever I create a new appointment, the defaul checkbox is always on Saturday.
    Even though users won't see this, but on the report showed every appointment has Saturday on it.

    Please help.  I tried this before the lines to hide them, but it seemed that I did not use the right syntax or something:
        
    $telerik.$(".rsAdvWeekly_WeekDays li:nth-child(0)").checked("false");
    $telerik.$(".rsAdvWeekly_WeekDays li:nth-child(6)").checked("false");

    Again, thank you for all your help.  I just want my product look better.

    Tiffany Phan
  5. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 19 May 2011 Link to this post

    Hello Tiffany Phan,

    Thank you for the good words. We are doing our best to provide the best support as well as implementation of controls.

    You were close however with your code you are trying to uncheck the .li element. You need to go one step further and access the input with type="checkbox". Here's the shortest solution:

    $telerik.$('input[id=RadScheduler1_Form_WeeklyWeekDaySaturday]').attr('checked', false);
    $telerik.$('input[id=RadScheduler1_Form_WeeklyWeekDaySunday]').attr('checked', false);

    Regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Tiffany Phan
    Tiffany Phan avatar
    17 posts
    Member since:
    Feb 2007

    Posted 19 May 2011 Link to this post

    Hi Veronica,

    Again, thank you.  Unfortunately, it seemed that the problem is with Recurrence or something.
    Please see my attached picture, so you can see what I meant.

    On the radgrid list, most of the classes included Sat on it, only one class without Saturday.  I don't know why.
    My clients will look up this list to see where/when/which day(s) they will meet, so they can sign up.
    If the classes with Sat on it, it's not good.

    Please advice!

    Thanks,

    Tiffany Phan
  7. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 May 2011 Link to this post

    Hello Tiffany Phan,

    This is very strange that one of the activities "Arts & Crafts" has no Saturday in it. Could you please take a look at the database where the appointment is saved and check whether there is Saturday in the RecurrenceRule. Also is there any chance that this appointment is created before you applied the requirement with checking the Saturday and Sunday checkboxes in the Recurrence Editor?

    Kind regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  8. Tiffany Phan
    Tiffany Phan avatar
    17 posts
    Member since:
    Feb 2007

    Posted 26 May 2011 Link to this post

    Hi Veronica,

    Thanks for your response.

    OK, I will clear all RecurrenceRules in my table and test it one more time to see any Saturday on it or not.
    One more thing.  Is that the single quote (') or double quote (") before "input" and "checked" words in the following statements?
    Could you please confirm these for me?

    $telerik.$('input[id=RadScheduler1_Form_WeeklyWeekDaySaturday]').attr('checked', false); 
    $telerik.$('input[id=RadScheduler1_Form_WeeklyWeekDaySunday]').attr('checked', false);

    Thanks for all your help!

    Tiffany Phan
  9. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 31 May 2011 Link to this post

    Hello Tiffany Phan,

    It doesn't matter whether you have single (') or double (") quotes in the jQuery expression. Both are correct.

    Greetings,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top