Home Forums Plugin Support WP Project Manager Pro date format

This topic is: resolved

This topic contains 38 replies, has 4 voices, and was last updated by  Zoltan 4 years, 3 months ago.

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #23515

    Alfredo
    Member
    Post count: 28

    I'm starting to use this plugin and I see that the date format is American (month/day/year). It's abit confusing for us non-American, and it doesn't follow the default chosen in wordpress settings.

    It looks like an implementation of datepicker, so it should be editable somewhere. Anything I could do about this?

    Cheers,
    Alfredo

    #23573

    Sekander Badsha
    Member
    Post count: 2067

    Hi Alfredo,
    Can you please tell me,
    1. Where is the date being displayed?
    2. How the input for date coming? Like you're inserting a date to display ? or are you talking about the default post date ?

    #23587

    Alfredo
    Member
    Post count: 28

    Hi Sekander,

    the problem is everywhere (projects, to-do, etc) there is a date to be picked or edited (click on the field, ‘due date' for example and the datepicker calendar shows up) and the date to be edited shows as mm/dd/yyyy. This is confusing if everybody is using either ansi-is yyyy/mm/dd or dd/mm/yyyy.

    It's consistent, it simply has its own default, doesn't take the WordPress settings and doesn't have an option in its own settings.

    Calendar of course has the week beginning on the wrong day, but I've seen in the forum it's something coming in the next version.

    This seems to be controlled from one file. If you point me in the right direction I really don't mind editing PHP to correct this.

    #23649

    Sekander Badsha
    Member
    Post count: 2067

    Hello Alfredo,

    Open functions.php which is located at “\wp-content\plugins\wedevs-project-manager\includes\” and go to line number 252 and you will see something like $format = 'M j, Y';. Comment that line out.
    So it'd look like // $format = 'M j, Y';

    Let me know if you feel any difficulty.

    #23653

    Alfredo
    Member
    Post count: 28

    Perfect! That fixed it so WPress date format settings come through on the display part and front-end

    1. Now, where to fix the edit field? It would be nice so that could show the same format (all edit fields where you determine for example, ‘due date' for a task, milestone, etc.)

    2. You say the starting day of the week will be fixed in the next update? If so I could try and edit myself the calendar addon, as it won't matter if it gets replcaed at the next update, Would taht be in fullcalendar.min.js?

    #23660

    Alfredo
    Member
    Post count: 28

    AH, please disregard question #2, I've fixed that now.

    For those interested:

    The file in question is the jQuery fullCalendar, fullcalendar.min.js found in
    wp-content/plugins/wedevs-project-manager-pro/assets/js

    it's minified, so it's a bit of a pain to edit, but not lethal ๐Ÿ˜‰
    and make a backup of it before changing, of course

    First day of the week
    ———————–
    You want to change the value of firstDay to 1:
    firstDay:1

    as a bonus, I also changed so the calendar shows the week number (I live in Sweden and everything, from manufacturing to public administration to schools, is scheduled by week number)

    Week numbering
    ———————–
    you want to change the value of weekNumbers to !0:
    weekNumbers:!0

    documentation at:
    http://arshaw.com/fullcalendar/docs/display/

    Cheers,
    Alfredo

    #23701

    Sekander Badsha
    Member
    Post count: 2067

    Thanks for being awesome and posting the solution ๐Ÿ™‚

    #23800

    Alfredo
    Member
    Post count: 28

    No worries, happy to contribute, I had seen a couple of guys had asked the same question already ๐Ÿ™‚

    By the way, you have marked this issue as ‘Resolved', but it actually isn't, only question #2. I still can't find where to edit for changing date format in the editing fields – which was question #1

    Cheers, /A.

    #23874

    Sekander Badsha
    Member
    Post count: 2067

    On your third post, you said that the solution worked and then you've got some more questions and those were solved too. So that's why I marked this topic as resolved.

    The issue you're talking about is only a temporary issue. Its just showing on the input field. But after submitting the date format is just like you have chosen in the WordPress Settings. So that's not a big thing. And moreover, changing that could cause some issues. So we decided not to change that. I hope you'll understand.

    #31732

    Joanne
    Member
    Post count: 20

    Hi

    I changed the functions file BUT nothing changed – I have tried it every which way

    what is the Exact line of code in the PHP script because what you said looks exactly the same if

    $format = ‘M j, Y';. Comment that line out
    and replace with $format = ‘M j, Y';

    if I delete the line $format = ‘M j, Y';. Comment that line out and replace with
    // $format = ‘M j, Y';

    I get a broken script error message

    I am in Australia and I really need the calander to look correct as 3/5/2014 is not 5th march but should read 3rd of may if it was australian time.

    appricate any help fast as it is live on a clients site

    Joanne

    #31739

    Alfredo
    Member
    Post count: 28

    Hi Joanne,

    what I did is just follow the instructions given by Sekander. Comment out the line. The line should look like this:
    // $format = 'M j, Y';
    maybe the blank space between // and $ is important in PHP and it's why you error out…

    Then, when that line is no longer interfering, just define the date format as you want it inside wordpress settings.

    Cheers, //A

    #31741

    Joanne
    Member
    Post count: 20
    This reply has been marked as private.
    #31742

    Joanne
    Member
    Post count: 20
    This reply has been marked as private.
    #31745

    Alfredo
    Member
    Post count: 28

    Hi Joanne,

    1) a couple of small things. I'm not a member of wedevs, just another user like you. If you mark your replies as ‘private' you'll have to wait until the guys in Bangladesh wake up, and nobody else in the support forum will be able to chip in with their knowledge/experience (I still can see your answers because I saterted this thread andI receive them as email)

    2) if you don't get any error, then you should go to wordpress settings and change the format there. As long as that line is commented out (or simply delete it, as Sekander proposes), then it won't interfere with wordpress own settings.

    3) Be sure that not just the time is set to local Perth, but the format as well, which is a separate setting (I suspect that may be causing the issue)

    4) If nothing else helps, then I guess you could use brute force, and restore the problematic line in functions.php, only change ti to the format you want. For example, UK format: ‘j M, Y'

    a full format code reference is in the wordpress codex (you can use this too in the date format settings, custom, in wordpress): http://codex.wordpress.org/Formatting_Date_and_Time

    Hope it helps. Cheers //A.

    #31777

    Joanne
    Member
    Post count: 20

    Which line of CSS do I change to indent it ?

    is the correct line
    .cpm {

    to be

    .cpm {
    font-size: 14px;
    line-height: 21px;
    vertical-align: baseline;
    position: relative;
    left: 200px;
    }

    thanks

    joanne

    weDevs Team wrote:

Viewing 15 posts - 1 through 15 (of 39 total)

The topic ‘date format’ is closed to new replies.