Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Event format date question

Open Alex-Ascet opened this issue 10 years ago • 7 comments

Hi there,

1- Is it possible to change the way to display the date to this way d/mY? In which file? I have tried to change the class-fw-extension-event.php without any results.

2- Is it possible to separate the date and the hour data of the event? Currently all data (date and hours) come with ['event_date_range']['from'] and ['event_date_range']['to']

Thank you very much for your time and this framework. Definitely love it!

Regards

Alex-Ascet avatar Dec 10 '15 04:12 Alex-Ascet

Any advice? Thank you.

Alex-Ascet avatar Dec 16 '15 23:12 Alex-Ascet

Any update?

Alex-Ascet avatar Dec 28 '15 01:12 Alex-Ascet

@llemurya Please, I definitely need an update on this feed. How can I change to d/m/Y on the event section (backend and frontend), Thank you for you help.

Alex-Ascet avatar Dec 28 '15 06:12 Alex-Ascet

@Alex-Ascet in the new version of the events I added an hook, you can change the datetime-pickers

add_filter('fw_option_type_event_datetime_pickers', function($data){
    $data['from']['format'] = 'd/mY';
    $data['to']['format'] = 'd/mY';

    return $data;
});

llemurya avatar Jan 04 '16 13:01 llemurya

@llemurya Thank you for your support, I really appreciate this new feature and help from you.

The step filter I have found here: https://github.com/ThemeFuse/Unyson-Events-Extension/issues/15 works perfectly but not the date format one. Here my code:

add_filter('fw_option_type_event_datetime_pickers', function($data){
    $data['from']['format'] = 'd/m/Y';
    $data['to']['format'] = 'd/m/Y';

    return $data;
});
add_filter('fw_option_type_event_datetime_pickers', function($data){
    $data['from']['step'] = 15;
    $data['to']['step'] = 15;

    return $data;
});

I have tried d/m/Y DD/MM/YYY and dmy without results.

This error appears: screen shot 2016-01-05 at 12 12 42 pm

Thank you for your time.

Alex-Ascet avatar Jan 05 '16 01:01 Alex-Ascet

Currently the event has to be at least one hour. How can we disable this option if we want to create a 30 minutes event? Thank you.

Alex-Ascet avatar Jan 05 '16 01:01 Alex-Ascet

@Alex-Ascet I tried to make it extensible , but the date formats are hardcoded in three places . I think we will refactor the whole events extension because now it is closed for extension.

llemurya avatar Jan 05 '16 12:01 llemurya