Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pzh20

    (@pzh20)

    I fixed it.

    I will try and document the changes I’ve made and send it back to you. You may want to use it.

    Regards
    Pete

    Hello pzh2, would you be as kind as to share the changes to support this functionality? thanks in advance!

    Thread Starter pzh20

    (@pzh20)

    I replace lines 234-235 of wp_jquery_timelinr.php with

    $currentDate = (substr($custom[“timelineDate”][0], 0, 4) != “”) ? substr($custom[“timelineDate”][0], 0, 4) : “1900-“;
    $currentDate .= (substr($custom[“timelineDate”][0], 4, 2) != “”) ? “-“.substr($custom[“timelineDate”][0], 4, 2) : “-01”;
    $currentDate .= (substr($custom[“timelineDate”][0], 6, 2) != “”) ? “-“.substr($custom[“timelineDate”][0], 6, 2) : “-01”;

    then lines 243-254 with
    day = dateParts[2] != undefined ? dateParts[2] : ’01’, month = dateParts[1] != undefined ? dateParts[1] -1 : ’01’, year = dateParts[0] //alert (day); //alert (month); //alert (year); jQuery(‘#timelineDate’).val(jQuery.datepicker.formatDate(‘yy-mm-dd’, new Date(year, month, day)));

    and lines 258-259 with
    list($year, $month, $day) = explode(‘-‘, $_POST[“timelineDate”]); update_post_meta($post->ID, “timelineDate”, $year.$month.$day);

    finally lines 294 and 295 with
    $date = (substr($custom[“timelineDate”][0], 0, 4) != “”) ? substr($custom[“timelineDate”][0], 0, 4) : “1900”; $date .= (substr($custom[“timelineDate”][0], 4, 2) != “”) ? “-“.substr($custom[“timelineDate”][0], 4, 2) : “-01”; $date .= (substr($custom[“timelineDate”][0], 6, 2) != “”) ? “-“.substr($custom[“timelineDate”][0], 6, 2) : “-01”;

    This worked for me.

    Regards
    Pete

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Supporting dd/mm/yy’ is closed to new replies.