Skip to content

Commit cbbec1b

Browse files
committedAug 13, 2019
fix console error and add in amPm
1 parent 1e72dd5 commit cbbec1b

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed
 

‎README.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# react-datetime
22

3+
4+
# Membean Release
5+
6+
```
7+
yarn version
8+
git tag <new-version>
9+
git push origin <new-version>
10+
11+
```
12+
313
[![Build Status](https://api.travis-ci.org/YouCanBookMe/react-datetime.svg?branch=master)](https://travis-ci.org/YouCanBookMe/react-datetime.svg?branch=master)
414
[![npm version](https://badge.fury.io/js/react-datetime.svg)](http://badge.fury.io/js/react-datetime)
515

‎example/example.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ ReactDOM.render(
88
value: moment(),
99
dateFormat: 'MMM D, YYYY',
1010
timeFormat: 'h:mm a',
11-
onChange: function (date) { console.log('onChange called with the following date:', date); },
11+
onChange: function (date) {
12+
console.log('onChange called with the following date:', date.format());
13+
},
1214
closeOnSelect: true,
1315
showTimeSelector: true,
1416
displayTimeZone: 'America/Phoenix'

‎example/react-datetime.css

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373
.rdtDays.rdtNoTime table {
7474
width: 100%;
75+
height: 100%;
7576
}
7677

7778
.rdtYears table thead tr,

‎src/DaysView.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var DateTimePickerDays = createClass({
3030
} else if (time.hour === 0) {
3131
formattedHour = 12;
3232
}
33-
var timeString = formattedHour + ':00';
33+
var timeString = formattedHour + ':00' + time.amPm;
3434
return React.createElement('li', {
3535
key: idx, className: 'time-selector-time', onClick: function () {
3636
that.props.setTime(time);
@@ -61,7 +61,7 @@ var DateTimePickerDays = createClass({
6161

6262
if (this.props.showTimeSelector) {
6363
timeSelector = React.createElement('div', { className: 'time-selector-container', key: 'time-selector' }, [
64-
React.createElement('ul', { className: 'time-selector-times' }, this.renderTimes())
64+
React.createElement('ul', { className: 'time-selector-times', key: 'time-selector-list' }, this.renderTimes())
6565
]);
6666
daysClass = 'rdtDays';
6767
} else {

0 commit comments

Comments
 (0)
Please sign in to comment.