From cf3d9288c97e65fdc66500b5bdc18604f97f0b85 Mon Sep 17 00:00:00 2001 From: Simon Egersand <s.egersand@gmail.com> Date: Thu, 03 Aug 2017 18:52:09 +0200 Subject: [PATCH] Use same tab indentiation in all JS files --- DateTime.js | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/DateTime.js b/DateTime.js index 421cd04..4d1d9f6 100644 --- a/DateTime.js +++ b/DateTime.js @@ -2,11 +2,11 @@ var assign = require('object-assign'), PropTypes = require('prop-types'), - createClass = require('create-react-class'), + createClass = require('create-react-class'), moment = require('moment'), React = require('react'), CalendarContainer = require('./src/CalendarContainer') -; + ; var TYPES = PropTypes; var Datetime = createClass({ @@ -68,7 +68,7 @@ var formats = this.getFormats( props ), date = props.value || props.defaultValue, selectedDate, viewDate, updateOn, inputValue - ; + ; if ( date && typeof date === 'string' ) selectedDate = this.localMoment( date, formats.datetime ); @@ -103,7 +103,7 @@ }, getUpdateOn: function( formats ) { - if ( formats.date.match(/[lLD]/) ) { + if ( formats.date.match(/[lLD]/) ) { return 'days'; } else if ( formats.date.indexOf('M') !== -1 ) { return 'months'; @@ -120,7 +120,7 @@ time: props.timeFormat || '' }, locale = this.localMoment( props.date, null, props ).localeData() - ; + ; if ( formats.date === true ) { formats.date = locale.longDateFormat('L'); @@ -200,7 +200,7 @@ var value = e.target === null ? e : e.target.value, localMoment = this.localMoment( value, this.state.inputFormat ), update = { inputValue: value } - ; + ; if ( localMoment.isValid() && !this.props.value ) { update.selectedDate = localMoment; @@ -272,7 +272,7 @@ state = this.state, date = (state.selectedDate || state.viewDate).clone(), nextType - ; + ; // It is needed to set all the time properties // to not to reset the time @@ -297,7 +297,7 @@ viewDate = this.state.viewDate, currentDate = this.state.selectedDate || viewDate, date - ; + ; if (target.className.indexOf('rdtDay') !== -1) { if (target.className.indexOf('rdtNew') !== -1) @@ -386,7 +386,7 @@ var me = this, formats = this.getFormats( this.props ), props = {dateFormat: formats.date, timeFormat: formats.time} - ; + ; this.componentProps.fromProps.forEach( function( name ) { props[ name ] = me.props[ name ]; @@ -407,8 +407,7 @@ var className = 'rdt' + (this.props.className ? ( Array.isArray( this.props.className ) ? ' ' + this.props.className.join( ' ' ) : ' ' + this.props.className) : ''), - children = [] - ; + children = []; if ( this.props.input ) { children = [ React.createElement('input', assign({ -- Gitblit v1.9.3