Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Field Issues #1767

Closed
coleh33 opened this issue Jan 22, 2018 · 1 comment
Closed

Date Field Issues #1767

coleh33 opened this issue Jan 22, 2018 · 1 comment
Labels
Milestone

Comments

@coleh33
Copy link

coleh33 commented Jan 22, 2018

Issue description:

I am seeing an issue with the new date field that it appears out of order after saving the option in the customizer. Strangely, it appeared in the correct place at first but after hitting save in the customizer it is being placed at the top of all the options in the section. I have tried this a few times and each time it ends up showing up out of order from the field order. I am using a custom timepicker control field within this section.

The other issue appears to be with entering a date. Every time I go to type in a day of the month that has two digits (ie 22), after the first character it jumps over to the year. You have to click a couple times back on the day integer field to get it to work properly. Is there any plans to re-incorporate back a calendar select popup for selecting dates rather than entering in the integer fields?

Version used:

Develop branch latest

Kirki::add_config( 'alphamedia-blacklab-mod', array(
  'capability'    => 'edit_theme_options',
  'option_type'   => 'theme_mod',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'text',
  'settings'    => 'program-name',
  'label'       => esc_html__( 'Program Name', 'alphamedia-blacklab' ),
  'description' => __( 'Enter the name for the special programming event.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'text',
  'settings'    => 'program-link',
  'label'       => esc_html__( 'Program Link', 'alphamedia-blacklab' ),
  'description' => __( 'Enter the clickthrough link for the special programming event.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'image',
  'settings'    => 'program-image',
  'label'       => __( 'Program Image', 'alphamedia-blacklab' ),
  'description' => __( 'Upload a 640x400 sized image to appear in the on-air now section.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'date',
  'settings'    => 'program-run-date',
  'label'       => esc_html__( 'Program Run Date', 'alphamedia-blacklab' ),
  'description' => __( 'Enter the date of the special programming.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'timepicker',
  'settings'    => 'program-start-time',
  'label'       => esc_html__( 'Program Start Time', 'alphamedia-blacklab' ),
  'description' => __( 'Enter the start time of the special programming.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
  'sanitize_callback' => 'sanitize_programming_time',
) );
Kirki::add_field( 'alphamedia-blacklab-mod', array(
  'type'        => 'timepicker',
  'settings'    => 'program-end-time',
  'label'       => esc_html__( 'Program End Time', 'alphamedia-blacklab' ),
  'description' => __( 'Enter the end time of the special programming.', 'alphamedia-blacklab' ),
  'section'     => 'special_programming',
  'sanitize_callback' => 'sanitize_programming_time',
) );
@aristath
Copy link
Contributor

The reason I chose to use this format for the date control now is because that's what WP-Core is using for the datetime control so I thought I'd follow their example.
However it's really problematic right now so yes, I'll probably have to revert to a datepicker

@aristath aristath added this to the 3.0.23 milestone Jan 22, 2018
@aristath aristath added the bug label Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants