Skip to content

Commit

Permalink
Post Schedule: Prefill the post schedule modal
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 23, 2017
1 parent 3cdbc7c commit b394b86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions editor/sidebar/post-schedule/clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { __ } from 'i18n';
import Button from 'components/button';

function PostScheduleClock( { is12Hour, selected, onChange } ) {
const minutes = selected ? selected.format( 'mm' ) : '';
const am = selected ? selected.format( 'A' ) : 'AM';
const hours = selected ? selected.format( is12Hour ? 'hh' : 'HH' ) : '';
const minutes = selected.format( 'mm' );
const am = selected.format( 'A' );
const hours = selected.format( is12Hour ? 'hh' : 'HH' );

const updateHours = ( event ) => {
const value = parseInt( event.target.value, 10 );
Expand Down
4 changes: 2 additions & 2 deletions editor/sidebar/post-schedule/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ class PostSchedule extends Component {

render() {
const { date, onUpdateDate } = this.props;
const momentDate = date ? moment( date ) : date;
const label = momentDate
const momentDate = date ? moment( date ) : moment();
const label = date
? dateI18n( settings.formats.datetime, date )
: __( 'Immediately' );
const handleChange = ( newDate ) => {
Expand Down

0 comments on commit b394b86

Please sign in to comment.