Make WordPress Core


Ignore:
Timestamp:
10/30/2017 04:39:06 PM (7 years ago)
Author:
westonruter
Message:

Customize: Allow 0:00-0:59 in date/time control when 24-hour time used.

  • Let min hour be 0 and max be 23 in 24-hour time; let min hour be 1 and max be 12 in 12-hour time.
  • Show error notification when an invalid date value is provided, not just when not a future date.
  • Fix translation of custom validity message.
  • Start checking for validity after all inputs have been initially populated.
  • Remove support for being able to enter 24:00.
  • Cease forcing date input elements from being casted to integers, to allow for invalid inputs to be detected.

Props westonruter, Presskopp, peterwilsoncc, atachibana for testing.
See #39896, #28721.
Fixes #42373.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r42025 r42042  
    600600        ),
    601601        'publishSettings' => __( 'Publish Settings' ),
     602        'invalidDate'     => __( 'Invalid date.' ),
     603        'invalidValue'    => __( 'Invalid value.' ),
    602604    ) );
    603605    $scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 );
Note: See TracChangeset for help on using the changeset viewer.