Make WordPress Core

Ticket #42373: 42373.3.diff

File 42373.3.diff, 1.5 KB (added by peterwilsoncc, 8 years ago)
  • src/wp-includes/customize/class-wp-customize-date-time-control.php

    diff --git a/src/wp-includes/customize/class-wp-customize-date-time-control.php b/src/wp-includes/customize/class-wp-customize-date-time-control.php
    index 0506910b61..c4ac741884 100644
    a b class WP_Customize_Date_Time_Control extends WP_Customize_Control { 
    141141                                        <legend class="title-time"><?php esc_html_e( 'Time' ); ?></legend>
    142142                                        <div class="time-fields clear">
    143143                                                <label for="{{ idPrefix }}date-time-hour" class="screen-reader-text"><?php esc_html_e( 'Hour' ); ?></label>
    144                                                 <# var maxHour = data.twelveHourFormat ? 12 : 24; #>
    145                                                 <input id="{{ idPrefix }}date-time-hour" type="number" size="2" autocomplete="off" class="date-input hour" data-component="hour" min="1" max="{{ maxHour }}">
     144                                                <#
     145                                                var minHour = data.twelveHourFormat ? 1  : 0;
     146                                                var maxHour = data.twelveHourFormat ? 12 : 23;
     147                                                #>
     148                                                <input id="{{ idPrefix }}date-time-hour" type="number" size="2" autocomplete="off" class="date-input hour" data-component="hour" min="{{ minHour }}" max="{{ maxHour }}">
    146149                                                <span class="time-special-char date-time-separator">:</span>
    147150                                                <label for="{{ idPrefix }}date-time-minute" class="screen-reader-text"><?php esc_html_e( 'Minute' ); ?></label>
    148151                                                <input id="{{ idPrefix }}date-time-minute" type="number" size="2" autocomplete="off" class="date-input minute" data-component="minute" min="0" max="59">