Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • okkhalid Friend
    #185411

    When admin try to add job from the backend on behalf of employers the publish date shows as: 1969-12-31 18:00:00
    it shows like that only in the backend. the front end when employer try to add job the dates are fine.
    please help


    1. backend
    HeR0 Friend
    #484990

    Hi Okkhalid,

    Please open file administrators/components/com_jajobboard/asset/rendfield.php
    – Find
    [PHP]case “DATE_CAL”:
    $dateFormat = $jbconfig[‘general’]->get(‘format_date’);
    if(!$dateFormat) {
    $dateFormat = “%Y-%m-%d %H:%M:%S”;
    }
    if($field->field_name == ‘created_date’){
    if ($value) {
    $value = date(str_replace(‘%’, ”, $dateFormat), strtotime($value));
    }
    $r = $value ;
    }else{
    $value = date(“Y-m-d H:i:s”, strtotime($value));
    $r = JHTML::_(‘calendar’, $value, $field->field_name, $field->field_name, “%Y-%m-%d %H:%M:%S”, array(‘class’ => isset($field->field_class) ? $field->field_class : “inputbox”, ‘size’ => ’25’, ‘maxlength’ => ’19’, $field->eventmouse => $field->functionjs));
    }
    break;[/PHP]
    – Change it to
    [PHP]$dateFormat = $jbconfig[‘general’]->get(‘format_date’);

    if(!$dateFormat) {
    $dateFormat = “%Y-%m-%d %H:%M:%S”;
    }

    if ($value && is_string($value)) {
    $value = date(“Y-m-d H:i:s”, strtotime($value));
    }

    $field->eventmouse = $field->eventmouse ? $field->eventmouse : ‘onclick’;
    $r = JHTML::_(‘calendar’, $value, $field->field_name, $field->field_name, “%Y-%m-%d %H:%M:%S”, array(‘class’ => $className, ‘size’ => ’25’, ‘maxlength’ => ’19’, $field->eventmouse => $field->functionjs));
    break;[/PHP]
    Hope this helps!

    <em>@okkhalid 362336 wrote:</em><blockquote>When admin try to add job from the backend on behalf of employers the publish date shows as: 1969-12-31 18:00:00
    it shows like that only in the backend. the front end when employer try to add job the dates are fine.
    please help
    </blockquote>

    Regards

    okkhalid Friend
    #485040

    Hi HeRO;

    It works 100%
    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  okkhalid 11 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum