Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
heenakwag committed Aug 6, 2019
2 parents c728deb + 58f0418 commit 4954ed5
Show file tree
Hide file tree
Showing 41 changed files with 774 additions and 582 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
"env": {
"browser": true,
"jasmine": true,
"jquery": true,
"commonjs": true
},
"globals": {
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ For more information on PR's step, please see links of Contributing section.
* [Getting Started](https://github.com/nhn/tui.date-picker/blob/production/docs/getting-started.md)
* [Tutorials](https://github.com/nhn/tui.date-picker/tree/production/docs)
* [APIs](https://nhn.github.io/tui.date-picker/latest)
* [v4.0.0 Migration Guide](https://github.com/nhn/tui.date-picker/blob/master/docs/getting-started.md#v400-migration-guide)

You can also see the older versions of API page on the [releases page](https://github.com/nhn/tui.date-picker/releases).

Expand All @@ -226,8 +227,8 @@ You can also see the older versions of API page on the [releases page](https://g

## 🔩 Dependency
* [tui-code-snippet](https://github.com/nhn/tui.code-snippet) >=1.5.0
* [tui-time-picker](https://github.com/nhn/tui.time-picker) >=1.3.0
* [jquery](https://jquery.com/) >=1.11.0
* [tui-dom](https://github.com/nhn/tui.dom) >=3.0.0
* [tui-time-picker](https://github.com/nhn/tui.time-picker) >=2.0.0


## 📜 License
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"package-lock.json"
],
"dependencies": {
"jquery": "^1.11.0",
"tui-code-snippet": "^1.5.0",
"tui-time-picker": "^1.3.0"
"tui-dom": "^3.0.0",
"tui-time-picker": "^2.0.0"
}
}
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
## Tutorials

- [Getting Started](getting-started.md)
- [v3.0.0 Migration Guide](v3.0.0-migration-guide.md)

## Documents

- [Code of Conducting](../CODE_OF_CONDUCTING.md)
- [Code of Conducting](../CODE_OF_CONDUCT.md)
- [Contributing Guide](../CONTRIBUTING.md)
- [Commit Message Convention](COMMIT_MESSAGE_CONVENTION.md)
- [API & Examples](https://nhn.github.io/tui.date-picker/latest)
40 changes: 34 additions & 6 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
## v4.0.0 Migration Guide
In v4.0.0, jQuery is removed. It might cause other components to fail if they pass a jQuery object as a container.

Previously, you can use a `jQuery` to create an instance.
```javascript
// v3
var instance = new tui.DatePicker($('#datepicker-wrapper'), {
// options
});
```

Now, you have to use `selector` or `HTMLElement` as a container.
```javascript
// v4
var instance = new tui.DatePicker('#datepicker-wrapper', {
// options
});

// or

var container = document.getElementById('datepicker-wrapper');
var instance = new tui.DatePicker(container, {
// options
});
```

## Load dependency files
* Script - [jQuery](https://github.com/jquery/jquery) 1.11.0 or later
* Script - [tui-code-snippet](https://github.com/nhn/tui.code-snippet) 1.2.5 or later
* Script - [tui-code-snippet](https://github.com/nhn/tui.code-snippet) 1.5.0 or later
* Script - [tui-dom](https://github.com/nhn/tui.dom) 3.0.0 or later
> If your project should support IE8, please use `tui-dom.js`, not `tui-dom.min.js`.
* Script - [tui-time-picker](https://github.com/nhn/tui.time-picker) 2.0.0 or later

```html
<html>
Expand All @@ -10,8 +38,8 @@
</head>
<body>
....
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="tui-code-snippet.js"></script>
<script type="text/javascript" src="tui-dom.min.js"></script>
<script type="text/javascript" src="tui-date-picker.js"></script>
....
</body>
Expand All @@ -37,7 +65,7 @@ var instance = new tui.DatePicker('#datepicker-wrapper', {
### Datepicker
* language (default 'en')
* There are two supporting types by default - 'en' and 'ko'.
* For custom texts - See the [Datepicker.localeTexts](https://nhn.github.io/tui.date-picker/latest/DatePicker.html#.localeTexts)
* For custom texts - See the [Datepicker.localeTexts](https://nhn.github.io/tui.date-picker/latest/DatePicker#localeTexts)
* If set both calendar-language and datepicker-language, will apply datepicker-language first.
* showAlways (default false)
* If true, the datepicker will not close until you call "close()".
Expand All @@ -51,7 +79,7 @@ var instance = new tui.DatePicker('#datepicker-wrapper', {
* See the [Date-Time text format](#date-time-text-format)
* type (default 'date')
* Type of picker - 'date', 'month', year'
* See [examples](https://nhn.github.io/tui.date-picker/latest/tutorial-example05-picking-month.html) in API page
* See [examples](https://nhn.github.io/tui.date-picker/latest/tutorial-example05-picking-month) in API page
* selectableRanges
* Set selectable dates of datepicker
* 2d-Array: `[[startDate1, endDate1], [startDate2, endDate2], ...]`
Expand All @@ -66,7 +94,7 @@ var instance = new tui.DatePicker('#datepicker-wrapper', {
### Calendar
* language (default 'en')
* There are two supporting types by default - 'en' and 'ko'.
* For custom texts - See the [Calendar.localeTexts](https://nhn.github.io/tui.date-picker/latest/Calendar.html#.localeTexts)
* For custom texts - See the [Calendar.localeTexts](https://nhn.github.io/tui.date-picker/latest/Calendar#localeTexts)
* showToday (default true)
* If true, calendar shows today
* showJumpButtons
Expand Down
2 changes: 1 addition & 1 deletion examples/example01-basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<div id="wrapper" style="margin-top: -1px;"></div>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var datepicker = new tui.DatePicker('#wrapper', {
Expand Down
2 changes: 1 addition & 1 deletion examples/example02-inline-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<div id="wrapper" style="margin-top: -1px;"></div>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var datepicker = new tui.DatePicker('#wrapper', {
Expand Down
2 changes: 1 addition & 1 deletion examples/example03-selectable-ranges.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ <h3>Selectables</h3>
</div>
<div id="wrapper" style="margin-top: -1px;"></div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var datepicker = new tui.DatePicker('#wrapper', {
Expand Down
6 changes: 3 additions & 3 deletions examples/example04-having-timepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>4. Having TimePicker</title>
<link rel="stylesheet" type="text/css" href="./css/tui-example-style.css" />
<link href="https://cdn.rawgit.com/nhnent/tui.time-picker/v1.0.0/dist/tui-time-picker.css" rel="stylesheet">
<link href="https://uicdn.toast.com/tui.time-picker/v2.0.0/tui-time-picker.css" rel="stylesheet">
<link href="../dist/tui-date-picker.css" rel="stylesheet">
</head>
<body>
Expand Down Expand Up @@ -38,9 +38,9 @@
</table>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.time-picker/v1.3.0/tui-time-picker.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.time-picker/v2.0.0/tui-time-picker.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var datepicker = new tui.DatePicker('#wrapper', {
Expand Down
2 changes: 1 addition & 1 deletion examples/example05-picking-month.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</table>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script type="text/javascript" class="code-js">
tui.DatePicker.localeTexts['Chinese character'] = {
Expand Down
2 changes: 1 addition & 1 deletion examples/example06-picking-year.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
</table>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script type="text/javascript" class="code-js">
tui.DatePicker.localeTexts['Chinese character'] = {
Expand Down
2 changes: 1 addition & 1 deletion examples/example07-calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</table>
</div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script type="text/javascript" class="code-js">
var DatePicker = tui.DatePicker;
Expand Down
2 changes: 1 addition & 1 deletion examples/example08-daterangepicker.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<div id="endpicker-container" style="margin-left: -1px;"></div>
</div>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var today = new Date();
Expand Down
20 changes: 16 additions & 4 deletions examples/example09-changing-type.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,20 @@
<input type="radio" id="year" name="datePickerType" value="year">
<label for="year">year</label>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.code-snippet/v1.5.0/tui-code-snippet.js"></script>
<script type="text/javascript" src="https://uicdn.toast.com/tui.dom/v3.0.0/tui-dom.js"></script>
<script type="text/javascript" src="../dist/tui-date-picker.js"></script>
<script class="code-js">
var util = {
addEventListener: function(element, eventName, handler) {
if (element.addEventListener) {
element.addEventListener(eventName, handler, false);
} else {
element.attachEvent('on' + eventName, handler);
}
}
};

var datepicker = new tui.DatePicker('#wrapper', {
date: new Date(),
input: {
Expand All @@ -35,9 +45,11 @@
type: 'date'
});

$('input[type=radio][name="datePickerType"]').change(function() {
datepicker.setType($(this).val());
});
var datePickerTypes = document.querySelector('.radio-set');
util.addEventListener(datePickerTypes, 'click', function(ev) {
var target = ev.target || ev.srcElement;
datepicker.setType(target.value);
})
</script>
</body>
</html>
31 changes: 0 additions & 31 deletions jsdoc.conf.json

This file was deleted.

Loading

0 comments on commit 4954ed5

Please sign in to comment.