Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jan Vermeerbergen 79 posts 112 karma points
    Jan 09, 2013 @ 01:30
    Jan Vermeerbergen
    0

    Question on "Razor Calendar Examples" package

    Hi,
    I just implemented the "Razor Calendar Examples" and was wondering if anybody could point me in the right direction to have the csyCalendarMini.cshtml weekdays start with Monday instead of Sunday?

     

    thanks!
    J

  • Matt Barlow | jacker.io 164 posts 727 karma points c-trib
    Jan 14, 2013 @ 13:02
    Matt Barlow | jacker.io
    0

    Change the macro, move Sunday to the end of the week:

    @helper getCalendar()
        {       
         <div class="calHeader">
        <a href="@Model.Url@prevLink">&lt;</a>
        <span>@dateString</span>
        <a href="@Model.Url@nextLink">&gt;</a></div>
        <table class="sm_calendar">
            <tr>
                 <th>
                    <abbr title="Monday">
                        Mon</abbr>
                </th>
                <th>
                    <abbr title="Tuesday">
                        Tue</abbr>
                </th>
                <th>
                    <abbr title="Wednesday">
                        Wed</abbr>
                </th>
                <th>
                    <abbr title="Thursday">
                        Thu</abbr>
                </th>
                <th>
                    <abbr title="Friday">
                        Fri</abbr>
                </th>
                <th>
                    <abbr title="Saturday">
                        Sat</abbr>
                </th>
               <th>
                    <abbr title="Sunday">
                        Sun</abbr>
                </th>
            </tr>

     

    And -1 from the dayOfWeek variable.

     dayOfWeek = (int)dt.DayOfWeek - 1;

  • Jan Vermeerbergen 79 posts 112 karma points
    Jan 14, 2013 @ 13:44
    Jan Vermeerbergen
    0

    Thanks! 

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies