Support » Plugin: Attendance Manager » Layout of date

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tnomi

    (@tnomi)

    Hello,
    How about the following way?

    <script>
    jQuery(document).ready(function($){
        $( 'table.attmgr_weekly_all th .date' ).each(function(){
            d = $( this ).text().split( '/' );
            $( this ).text( d[1]+'-'+d[0] );
        });
    });
    </script>

    This is one of example.

    Thread Starter kleijheeg

    (@kleijheeg)

    Looks good and easy. Where should I place this code?

    in:

    class\class-functions.php

    Plugin Author tnomi

    (@tnomi)

    For example, I inserted that in a ‘Weekly schedule’ page.

    <script>
    jQuery(document).ready(function($){
        $( 'table.attmgr_weekly_all th .date' ).each(function(){
            d = $( this ).text().split( '/' );
            $( this ).text( d[1]+'-'+d[0] );
        });
    });
    </script>
    [attmgr_weekly_all]

    Or into “header.php” of your theme.

    Thread Starter kleijheeg

    (@kleijheeg)

    Thanks works great!

    Also the week navigation is displayed the wrong lay-out

    « 11/17 ~ 11/23 »

    I changed that by replacing a part of a string

    date( 'n/j',
     by
    date( 'j-n',
    
    In the files
    class\class-calendar.php
    class\class-form.php

    Do you like to receive my Dutch translation?

    Plugin Author tnomi

    (@tnomi)

    Thank you very much!
    Please send to me your translation.

    http://olbsys.com/contact/
    You can attach a file temporarily.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Layout of date’ is closed to new replies.