Skip to content

Commit

Permalink
Version 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simeg committed Jul 30, 2017
1 parent b8d07e8 commit 8335317
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog
=========
## 2.9.0
* Trigger callback method on view mode changes

## 2.8.11
* Update TypeScript definitions
* Replace deprecated React method with non-deprecated method
Expand Down
25 changes: 14 additions & 11 deletions dist/react-datetime.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ return /******/ (function(modules) { // webpackBootstrap
'use strict';

var assign = __webpack_require__(1),
PropTypes = __webpack_require__(2),
createClass = __webpack_require__(11),
PropTypes = __webpack_require__(2),
createClass = __webpack_require__(11),
moment = __webpack_require__(16),
React = __webpack_require__(12),
CalendarContainer = __webpack_require__(17)
Expand All @@ -77,6 +77,7 @@ return /******/ (function(modules) { // webpackBootstrap
onFocus: TYPES.func,
onBlur: TYPES.func,
onChange: TYPES.func,
onViewModeChange: TYPES.func,
locale: TYPES.string,
utc: TYPES.bool,
input: TYPES.bool,
Expand All @@ -102,6 +103,7 @@ return /******/ (function(modules) { // webpackBootstrap
onFocus: nof,
onBlur: nof,
onChange: nof,
onViewModeChange: nof,
timeFormat: true,
timeConstraints: {},
dateFormat: true,
Expand Down Expand Up @@ -162,13 +164,11 @@ return /******/ (function(modules) { // webpackBootstrap
},

getUpdateOn: function( formats ) {
if ( formats.date.match(/[lLD]/) ) {
if ( formats.date.match(/[lLD]/) ) {
return 'days';
}
else if ( formats.date.indexOf('M') !== -1 ) {
} else if ( formats.date.indexOf('M') !== -1 ) {
return 'months';
}
else if ( formats.date.indexOf('Y') !== -1 ) {
} else if ( formats.date.indexOf('Y') !== -1 ) {
return 'years';
}

Expand Down Expand Up @@ -266,8 +266,7 @@ return /******/ (function(modules) { // webpackBootstrap
if ( localMoment.isValid() && !this.props.value ) {
update.selectedDate = localMoment;
update.viewDate = localMoment.clone().startOf('month');
}
else {
} else {
update.selectedDate = null;
}

Expand All @@ -285,6 +284,7 @@ return /******/ (function(modules) { // webpackBootstrap
showView: function( view ) {
var me = this;
return function() {
me.state.currentView !== view && me.props.onViewModeChange( view );
me.setState({ currentView: view });
};
},
Expand All @@ -301,6 +301,7 @@ return /******/ (function(modules) { // webpackBootstrap
viewDate: me.state.viewDate.clone()[ type ]( parseInt(e.target.getAttribute('data-value'), 10) ).startOf( type ),
currentView: nextViews[ type ]
});
me.props.onViewModeChange( nextViews[ type ] );
};
},

Expand Down Expand Up @@ -357,7 +358,7 @@ return /******/ (function(modules) { // webpackBootstrap
viewDate = this.state.viewDate,
currentDate = this.state.selectedDate || viewDate,
date
;
;

if (target.className.indexOf('rdtDay') !== -1) {
if (target.className.indexOf('rdtNew') !== -1)
Expand Down Expand Up @@ -2670,6 +2671,8 @@ return /******/ (function(modules) { // webpackBootstrap
/* 17 */
/***/ (function(module, exports, __webpack_require__) {

'use strict';

var React = __webpack_require__(12),
createClass = __webpack_require__(11),
DaysView = __webpack_require__(18),
Expand Down Expand Up @@ -2703,7 +2706,7 @@ return /******/ (function(modules) { // webpackBootstrap
var React = __webpack_require__(12),
createClass = __webpack_require__(11),
moment = __webpack_require__(16),
onClickOutside = __webpack_require__(19)
onClickOutside = __webpack_require__(19)
;

var DateTimePickerDays = onClickOutside( createClass({
Expand Down
4 changes: 2 additions & 2 deletions dist/react-datetime.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react-datetime.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-datetime",
"version": "2.8.11",
"version": "2.9.0",
"description": "A lightweight but complete datetime picker React.js component.",
"homepage": "https://github.com/YouCanBookMe/react-datetime",
"repository": {
Expand Down

0 comments on commit 8335317

Please sign in to comment.