Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Fix/react 16 update #207

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
06f2fa6
Add month picker option to mode
camjackson Nov 19, 2015
5113410
Bump version to 0.0.23
camjackson Nov 20, 2015
2692246
add the validation classes, allow date picker to show on the top or t…
maggie-mu Nov 20, 2015
064e18d
default text should be a placeholder rather than a input value
maggie-mu Nov 23, 2015
195da11
add today button for date picker(mode='date')
maggie-mu Nov 23, 2015
6a24312
remove unused code
maggie-mu Nov 23, 2015
b483af9
Change package.json to deploy to myob npm registry
camjackson Nov 23, 2015
d315fac
Bump version to 0.0.24
camjackson Nov 23, 2015
eed7315
Fix a bug where invalid initial input breaks the datepicker
camjackson Nov 26, 2015
3533624
calcuate the position when switching from date to year or month view
maggie-mu Nov 29, 2015
58c8b31
add different class name for month/year/time view
maggie-mu Nov 30, 2015
01ba23c
Updated README.md to includ correct npm install format
essentials-genesis-robot Dec 2, 2015
842e3c2
Added support for onBlur
essentials-genesis-robot Dec 7, 2015
94f5280
Fixed markdown issues in README.md
essentials-genesis-robot Dec 7, 2015
87666c7
Merge pull request #1 from MYOB-Technology/feature-support-onBlur
Dec 8, 2015
0bab7ab
Add npm scripts for releasing
camjackson Dec 8, 2015
c310e16
Fix typo in release script
camjackson Dec 8, 2015
683e42c
Added support for custom ref for input field
essentials-genesis-robot Dec 10, 2015
94a9af6
Merge pull request #2 from MYOB-Technology/feature-add-ref-support
Dec 10, 2015
b7ed1e8
Support for minDate and maxDate for months and years calendar. Added …
richard-lopes Dec 11, 2015
508e7b8
Added 2 unit tests to cover minDate and maxDate
richard-lopes Dec 11, 2015
62642fc
Better now
richard-lopes Dec 14, 2015
5cdc1d4
Months start from 0 not 1
richard-lopes Dec 14, 2015
f9cea5c
tests pass
richard-lopes Dec 14, 2015
3caa7c1
Merge pull request #3 from richard-lopes/master
camjackson Dec 15, 2015
df12d6c
Add release process to README
jcreencia Jan 27, 2016
09fb08a
Add local linking to README
jcreencia Jan 27, 2016
c20dc1f
BARRY-78 adding ability to pass displayformat for datetime.
bita-c Jan 29, 2016
cf2dd33
Merge pull request #6 from MYOB-Technology/BARRY-78-NEW
camjackson Jan 29, 2016
6feb974
BARRY-78 updating README to include changes to library and include re…
bita-c Jan 29, 2016
f9daaf5
Bump version to 0.1.0
bita-c Jan 29, 2016
21990a8
Fixed a bug when selecting a month, no resetting the error styles of …
richard-lopes Feb 19, 2016
e8be26f
Merge pull request #7 from richard-lopes/master
lawrencesong Feb 19, 2016
a3e86d3
Fix bug when inputFormat accepts both YY and YYYY
jcreencia Apr 20, 2016
472b9dd
Merge pull request #8 from MYOB-Technology/titan
jcreencia Apr 20, 2016
94461eb
DateTimeField now accepts ‘onBlur’ and ‘name’ props
jcreencia Apr 20, 2016
1b7701a
Hitting the Enter key produces the same effect as an onBlur
jcreencia Apr 20, 2016
096224e
DateTimeField now accepts ‘tabIndex’ as props
jcreencia Apr 20, 2016
578e971
Add ‘onEnterKeyDown’ prop and call it when Enter key is pressed
jcreencia Apr 21, 2016
6918ed7
Pass the onKeyDown event to formatValueForEvent
jcreencia Apr 22, 2016
8a2d54f
Merge pull request #9 from MYOB-Technology/titan
camjackson Apr 22, 2016
b2d4044
Bump version to 0.2.0
jcreencia Apr 22, 2016
31d065b
Add changelog
jcreencia Apr 22, 2016
8e0122f
Add note to Readme regarding the use / and space
jcreencia Apr 26, 2016
15eb637
Remove the CSS class "old" from the year picker
renatamckay May 9, 2016
4c1492d
Merge pull request #10 from renatamckay/patch-1
camjackson May 9, 2016
5acce64
Update README.md
camjackson May 9, 2016
134f5bc
Bump version to 0.2.1
camjackson May 9, 2016
bf7f5d8
Bump version to 0.2.2
camjackson May 9, 2016
54cfda1
Do not limit the type of separator for date value
jcreencia Jun 5, 2016
b2d04aa
Modified test for year digits
jcreencia Jun 6, 2016
92b2a8d
Merge pull request #11 from MYOB-Technology/datepicker
camjackson Jun 7, 2016
72ba4f4
Bump version to 0.2.3
jcreencia Jun 7, 2016
8e59337
Update changelog for 0.2.3 release
jcreencia Jun 7, 2016
0c337e3
Added an extra hour to the prevMonth when it is on the day that DST o…
Oct 6, 2016
a9f0b8d
increased version number
Oct 6, 2016
644e4cd
Bump version to 0.3.0
Oct 6, 2016
d18ddc7
default to empty string instead of undefined for value so React does …
Oct 7, 2016
ea47e57
Bump version to 0.4.0
Oct 7, 2016
bca9b35
initialise the value to dateTime even with defaultText set
walid-halabi-myob Nov 3, 2016
a920cd0
improve test legibility
walid-halabi-myob Nov 7, 2016
ee57f80
improve datetimefield inputValue conditional legibility
walid-halabi-myob Nov 9, 2016
7223ae3
Merge pull request #13 from walid-halabi-myob/master
timweightman Nov 10, 2016
29bb4dc
0.4.1
walid-halabi-myob Nov 11, 2016
2abafbe
Bump version to 0.4.2
walid-halabi-myob Nov 11, 2016
3196a5d
Update defaultText description in README.md
walid-halabi-myob Nov 11, 2016
c767d2e
Update changelog for 0.4.2 release
walid-halabi-myob Nov 11, 2016
18dcf42
Update README.md
lawrencesong Jan 13, 2017
5b70d4f
fix a issue of DatePicker in myob widget, which is we can not reset …
ynjia Jan 13, 2017
e0900c1
Bump version to 0.5.0
ynjia Jan 16, 2017
9375da0
[#389] : when user select a date with datePicker, and go to other pag…
ynjia Jan 18, 2017
37b684f
Bump version to 0.5.1
ynjia Jan 18, 2017
519cdc2
make min and max dates soft rather than fully disable
Blastoplex Jan 25, 2017
d9310d9
make min and max dates soft rather than fully disable
Blastoplex Jan 25, 2017
074184c
Merge branch 'master' of github.com:MYOB-Technology/react-bootstrap-d…
Blastoplex Jan 25, 2017
8f8d74b
update changelog
Blastoplex Jan 25, 2017
64c0d86
Bump version to 0.5.2
Blastoplex Jan 25, 2017
af26a99
TITAN-335: do not format inputValue when onChange
Mar 22, 2017
82410c2
Merge pull request #14 from MYOB-Technology/TITAN-335
timweightman Mar 23, 2017
cf74ef6
Bump version to 0.6.0
Mar 23, 2017
d12f278
Update CHANGELOG for 0.6.0
Mar 23, 2017
4094516
This change allows the "dateTime" property of the DateTimeField to ta…
Aug 23, 2017
3f2dc65
Merge pull request #15 from MYOB-Technology/allowMomentAsInitialValue
Plasmadog Aug 25, 2017
16eac86
Bump version to 0.7.0
Aug 25, 2017
b2f7d7a
Update CHANGELOG for 0.7.0
Aug 25, 2017
d236301
Update to React 16 compatibility to handle split of prop types library.
brewsoftware Oct 30, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com).

## [0.7.0] - 2017-08-25
### Changed
* Allowed the dateTime property to accept an existing Moment instance, to allow preservation of UTC flag.

## [0.6.0] - 2017-03-23
### Changed
* Do not format inputValue when onChange to solve [issue](https://github.com/MYOB-Technology/myob_widgets/issues/460)
[0.6.0]: https://github.com/MYOB-Technology/react-bootstrap-datetimepicker/compare/v0.5.2...v0.6.0

## [0.5.2] - 2017-01-25
### Changed
* Made min and max dates soft disable fields such that they will still be greyed out but but still be able to be clicked
[0.5.2]: https://github.com/MYOB-Technology/react-bootstrap-datetimepicker/compare/v0.4.2...v0.5.2

## [0.4.2] - 2016-11-11
### Fixed
* Initialise the DateTimeField's inputValue to dateTime, even if defaultText is set

[0.4.2]: https://github.com/MYOB-Technology/react-bootstrap-datetimepicker/compare/v0.4.0...v0.4.2

## [0.2.3] - 2016-06-07
### Changed
* Removed the assumption that dates typed in the input field will be separated by either a ‘/’ for date mode and a space for month mode.

[0.2.3]: https://github.com/MYOB-Technology/react-bootstrap-datetimepicker/compare/v0.2.2...v0.2.3

## [0.2.0] - 2016-04-22
### Added
* 'onBlur', 'onEnterKeyDown', 'name', and 'tabIndex' props to DateTimeField

### Fixed
* When selecting a month, it does not reset the error styles of the input
* Auto-evaluates year at 2 digits when both YY and YYYY formats are accepted

### Changed
* The DateTimeField now assumes that dates typed in the input field will be separated by either a ‘/’ or a space.

[0.2.0]: https://github.com/MYOB-Technology/react-bootstrap-datetimepicker/compare/v0.1.0...v0.2.0
62 changes: 54 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ This project is a port of https://github.com/Eonasdan/bootstrap-datetimepicker f
Usage
===============================

Installation :
```
npm install react-bootstrap-datetimepicker
```
Installation : `npm install --save @myob/react-bootstrap-datetimepicker`

Then

```javascript
//ES5
var DateTimeField = require('react-bootstrap-datetimepicker');

//ES6
import DateTimeField from "react-bootstrap-datetimepicker"

...

render: function() {
Expand All @@ -31,28 +33,72 @@ DateTimeField

| Name | Type | Default | Description |
| ------------ | ------- | ------- | ----------- |
| **dateTime** | string | moment().format('x') | Represents the inital dateTime, this string is then parsed by moment.js |
| **dateTime** | string or moment | moment().format('x') | Represents the initial dateTime. If this is a string it will be parsed by moment.js using **format**, otherwise an existing moment instance may be used. |
| **format** | string | "x" | Defines the format moment.js should use to parse and output the date to onChange |
| **inputFormat** | string | "MM/DD/YY h:mm A" | Defines the way the date is represented in the HTML input. It must be a format understanable by moment.js |
| **inputFormat** | string or array | *see default format table below* | Defines the *accepted* date formats in the HTML input. It must be a format understandable by moment.js |
| **inputDisplayFormat** | string | When there is **_no inputFormat given_**:<br> *see default format table below*. <br><br> When an **_inputFormat_** is given and it is a **string**: it takes the inputFormat. <br><br> When the **_inputFormat_** is an **array**: it takes the first inputFormat. | Defines the *display* format of the date in the HTML input. It must be a format understandable by moment.js. <br><br> If there is an **_inputFormat_** given, the inputDisplayFormat must be one of the formats listed in the inputFormat|
| **onChange** | function | x => console.log(x) | Callback trigger when the date changes. `x` is the new datetime value. |
| **onBlur** | function | () => {} | Callback trigger when the date field blurs. |
| **onEnterKeyDown** | function | () => {} | Callback trigger when the Enter key is pressed. |
| **showToday** | boolean | true | Highlights today's date |
| **size** | string | "md" | Changes the size of the date picker input field. Sizes: "sm", "md", "lg" |
| **daysOfWeekDisabled** | array of integer | [] | Disables clicking on some days. Goes from 0 (Sunday) to 6 (Saturday). |
| **viewMode** | string or number | 'days' | The default view to display when the picker is shown. ('years', 'months', 'days') |
| **inputProps** | object | undefined | Defines additional attributes for the input element of the component. |
| **inputRef** | string or function | inputDateTime | Allows a custom reference to be passed to the input field. |
| **minDate** | moment | undefined | The earliest date allowed for entry in the calendar view. |
| **maxDate** | moment | undefined | The latest date allowed for entry in the calendar view. |
| **mode** | string | undefined | Allows to selectively display only the time picker ('time') or the date picker ('date') |
| **defaultText** | string | {dateTime} | Sets the initial value. Could be an empty string, or helper text. |
| **mode** | string | undefined | Allows to selectively display only the time picker ('time'), date picker ('date'), or month picker ('month') |
| **defaultText** | string | undefined | Sets the input's placeholder value. Could be an empty string, or helper text. |
| **name** | string | undefined | Sets the name of the input element. |
| **tabIndex** | string | undefined | Sets the tabIndex of the input element. |


Default Format Based on Mode
========

| Mode | Format |
| ------------ | ------- |
| **time** | "h:mm A" |
| **date** | "MM/DD/YY" |
| **month** | "MM/YY" |
| *none given* | "MM/DD/YY h:mm A" |

Release Process
========
Once your pull request has been merged to master:

1. Make sure you have the latest changes by running `git pull` on the master branch.
2. *(Optional)* Check that your changes are reflected in the lib/react-bootstrap-datetimepicker.js file by running `npm run build-npm` and checking the file manually from the lib folder.
3. When you're happy with your changes, run on your console:

npm run patch-release
#OR
npm run minor-release
#OR
npm run major-release

Please respect [semantic versioning](http://semver.org/)!

If the release command fails, then please read what the release command does (see `package.json`), and figure out which step of the process went wrong, so that you can re-try just that bit. If you get stuck, ping #ex-myob-widgets for help!

Local linking to another project
========
1. Run `npm run build-npm` from the react-bootstrap-datetimepicker console.
2. In your other project's **package.json**,
Use `"@myob/react-bootstrap-datetimepicker": "#{local_path}/react-bootstrap-datetimepicker"` instead of `"@myob/react-bootstrap-datetimepicker": "0.0.25"` in the dependency list.
3. Run `npm install @myob/react-bootstrap-datetimepicker` from the same folder level as the package.json.

Update Warning
===============================
Starting from 0.0.6, the 3 github repositories `react-bootstrap-datetimepicker`, `react-bootstrap-datetimepicker-npm` and `react-bootstrap-datetimepicker-bower` are merged in a single one. The build process changed but the API is the same.
However now the package exports DateTimeField directly, no need to do :

```javascript
var DateTimeField = require('react-bootstrap-datetimepicker').DateTimeField;
```
instead use :

```javascript
var DateTimeField = require('react-bootstrap-datetimepicker');
```
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-bootstrap-datetimepicker",
"version": "0.0.22",
"version": "0.0.23",
"main": [
"./dist/react-bootstrap-datetimepicker.min.js"
],
Expand Down
Loading