Skip to content

Commit 333dbcb

Browse files
committed
Merge branch 'master' of https://github.com/g-gray/react-datetime into g-gray-master
2 parents c065c33 + d9d0cf0 commit 333dbcb

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/MonthsView.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ var DateTimePickerMonths = React.createClass({
5858
},
5959

6060
renderMonth: function( props, month, year, selectedDate ) {
61-
return DOM.td( props, this.props.viewDate.localeData()._monthsShort[ month ] );
61+
var monthsShort = this.props.viewDate.localeData()._monthsShort
62+
return DOM.td( props, monthsShort.standalone
63+
? capitalize( monthsShort.standalone[ month ] )
64+
: monthsShort[ month ]
65+
)
6266
}
6367
});
6468

69+
function capitalize(str) {
70+
return str.charAt(0).toUpperCase() + str.slice(1)
71+
}
72+
6573
module.exports = DateTimePickerMonths;

tests/datetime-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ describe( 'Datetime', function(){
533533
assert.notEqual( dt.hour().innerHTML, 2 );
534534
assert.notEqual( dt.hour().innerHTML, 3 );
535535
done();
536-
}, 700 );
536+
}, 920 );
537537
});
538538

539539
it( 'long decrease time', function( done ){
@@ -546,7 +546,7 @@ describe( 'Datetime', function(){
546546
assert.notEqual( dt.hour().innerHTML, 1 );
547547
assert.notEqual( dt.hour().innerHTML, 0 );
548548
done();
549-
}, 700 );
549+
}, 920 );
550550
});
551551

552552
it( 'invalid input value', function( done ){

0 commit comments

Comments
 (0)