Copied to clipboard

Flag this post as spam?

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


  • aaronb 97 posts 116 karma points
    Jun 04, 2010 @ 23:08
    aaronb
    0

    highlighting current day?

    I've been poking around in the xslt trying to add an if statement where it will test for 'today' and assign a different class, but this is certainly more advanced xslt than I'm usually working with. I'm looking at the parts which color weekends different colors as a starting point but I'm struggling to figure out how to compare it to the current day.

    Has anyone managed to do this, whereby it will higlight the current day only on the current month?

    Any pointers as to how I should be looking to do this would be great.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jun 05, 2010 @ 09:20
    Peter Dijksterhuis
    1

    Hi,

    I take it you are using the PDUlliCalendar.xslt?

    If so, go to the last template in the xslt: createOneCell

    There's also the check for saturdays and sundays, it's fairly easy to add a check for today as well.

    add this below the saturday:

            <xsl:if test="date:date() = $cell/@date" >

                <xsl:attribute name="class">today</xsl:attribute>

            </xsl:if>

    This should do the trick.
    Peter

Please Sign in or register to post replies

Write your reply to:

Draft