이 플러그인은 최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다. 워드프레스의 좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 있을 수 있습니다.

Date and Time Picker Field

설명

This is an add-on for the Advanced Custom Fields WordPress plugin, that allows you to add a Date and Time Picker field type.

ACF PRO 5.0+ is no longer supported, ACF PRO has its own date and time picker

Compatibility

This add-on will work with:

  • Advanced Custom Fields version 4..
  • Advanced Custom Fields version 3 and bellow

정보 더보기

http://soderlind.no/time-picker-field-for-advanced-custom-fields/

스크린샷

  • Add the Date and Time Picker field
  • Date and Time Picker
  • Time Picker

설치

플러그인

  1. Copy the ‘acf-date_time_picker’ folder into your plugins folder
  2. Activate the plugin via the Plugins admin page

Include

  1. Copy the ‘acf-date_time_picker’ folder into your theme folder (can use sub folders). You can place the folder anywhere inside the ‘wp-content’ directory
  2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-date_time_picker.php file)

    add_action(‘acf/register_fields’, ‘my_register_fields’);

    function my_register_fields()
    {
    include_once(‘acf-date_time_picker/acf-date_time_picker.php’);
    }

FAQ

Installation Instructions

플러그인

  1. Copy the ‘acf-date_time_picker’ folder into your plugins folder
  2. Activate the plugin via the Plugins admin page

Include

  1. Copy the ‘acf-date_time_picker’ folder into your theme folder (can use sub folders). You can place the folder anywhere inside the ‘wp-content’ directory
  2. Edit your functions.php file and add the code below (Make sure the path is correct to include the acf-date_time_picker.php file)

    add_action(‘acf/register_fields’, ‘my_register_fields’);

    function my_register_fields()
    {
    include_once(‘acf-date_time_picker/acf-date_time_picker.php’);
    }

Updating to ACF PRO

I got this quetion over at AWP on Facebook:

How does upgrading work? If someone starts with ACF and your plugin,
then upgrades to ACF Pro, will their date/time custom field disappear?
I understand the data will be maintained but wondering if the field
will still be visible in WP admin.

Updating to ACF PRO should work fine, ACF PRO has a compatibility add-on for this plugin, but test it on a non production environment first.

Also, read the comments on this issue: https://github.com/…/acf-field-date-time-picker/issues/103

How do I set the date and time format?

To set the date and time format when you create the field, you have to create a string using the letters below.

Date format

d day of month (no leading zero)
dd day of month (two digit)
o day of the year (no leading zeros)
oo day of the year (three digit)
D day name short
DD day name long
m month of year (no leading zero)
mm month of year (two digit)
M month name short
MM month name long
y year (two digit)
yy year (four digit)

Time format

H Hour with no leading 0 (24 hour)
HH Hour with leading 0 (24 hour)
h Hour with no leading 0 (12 hour)
hh Hour with leading 0 (12 hour)
m Minute with no leading 0
mm Minute with leading 0
s Second with no leading 0
ss Second with leading 0
l Milliseconds always with leading 0
t a or p for AM/PM
T A or P for AM/PM
tt am or pm for AM/PM
TT AM or PM for AM/PM

예제
  • yy-mm-dd: 2013-04-12
  • HH:mm: 24 hour clock, with a leading 0 for hour and minute
  • h:m tt: 12 hour clock with am/pm, no leading 0

How do I format the date and time when I want to use it in my theme?

The Date and Time Picker field is saved as an UNIX timestamp. Use the PHP date function when you use it in your theme.

후기

2017년 4월 2일
This plugin works great. It allows admins to select date and time. This plugin should have been included with the ACF core.
2017년 2월 28일
Functionality on desktop is fine but poor on mobile devices. Doesn’t function correctly in Contact 7. Kept being asked did I want to leave the page after saving. Affects other pages using datepicker.
모든 15 평가 읽기

기여자 & 개발자

“Date and Time Picker Field”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 기여하였습니다.

기여자

“Date and Time Picker Field”(이)가 3 개 언어로 번역되었습니다. 기여해 주셔서 번역자님께 감사드립니다.

자국어로 “Date and Time Picker Field”(을)를 번역하세요.

개발에 관심이 있으십니까?

코드 탐색하기는, SVN 저장소를 확인하시거나, 개발 기록RSS로 구독하세요.

변경이력

2.1.5

  • Remove call to write_log() causing fatal error.

2.1.4

  • Fix for English Canadian locale which became Catalan, also fixes other en_*, fr_* and de_* locale.

2.1.3

  • Sorry, but 2.1.2 had unfinsihed code, please update to 2.1.3

2.1.2

  • Tested & found compatible with WP 4.7.

2.1.1

  • Tested & found compatible with WP 4.6.

2.1.0

2.0.18

2.0.17

  • Thanks to leocaseiro, Fix Backend Timestamp handling: render_field and Tested Up WordPress 4.0

2.0.16

  • Fix Undefined property: acf_field_date_time_picker::$domain

2.0.15

2.0.14

  • Added new languages/acf-field-date-time-picker.po file (note, renamed the language file)

2.0.13

  • Fixed compatibility bug with ACF 4.3.5
  • NOTE: 2.0.13 requires ACF 4.3.5 or later

2.0.12

  • Added support for date format dd/mm/yy
  • Bugfix

2.0.11

  • Added option to retrive field values, using the_field() and get_field(), as a timestamp

2.0.10

  • Removed “value” from defaults

2.0.9

  • Thanks to flahertydaf, the plugin in now working with the latest ACF version
  • Replaced DateTime::createFromFormat (PHP 5 >= 5.3.0), with strtotime
  • minor bugfixes

2.0.8

  • Adds option to store the date and time field as a UNIX timestamp or not.

2.0.7

  • Bug fix. 2.0.6 assumed that the stored date and time was in UNIX timestamp format. 2.0.7 will check and only convert if the date and time is.

2.0.6

  • Changed how the Date and Time Picker field is triggered when ACF adds a new Date and Time Picker field to the DOM
  • Saves the Date and Time Picker field as an UNIX timestamp to MySQL. Use the PHP date function when you use it in your theme.

2.0.5

  • When enqueuing JavaScripts, replaced dependecy of jquery-ui-datepicker with acf-datepicker

2.0.4

2.0.3

  • Fixed Repeater field bug
  • Added support for including the field in a theme

2.0.2

  • Updated readme.txt

2.0.1

  • Minor fix

2.0.0.beta

  • Total rewrite, based on the acf-field-type-template. Works with ACF v3 and ACF v4. In this beta you can only add the Date Time Picker field as a plugin (i.e. not as a template field).

1.2.0

  • Updated jquery-ui-timepicker-addon.js to the latest version (1.0.0) and added localization support.

1.1.1

  • Fixed a small bug

1.1

  • Change name to Date and Time Picker to reflect the new option to select between Date and Time picker or Time Picker only. Thanks to Wilfrid for point this out (not sure why I didn’t include it in 1.0)

1.0

  • Initial version