Skip to content

Commit

Permalink
Merge branch 'release/2.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamDASILVA committed Oct 1, 2019
2 parents 6af22b3 + 97462f7 commit c35c54c
Show file tree
Hide file tree
Showing 25 changed files with 5,537 additions and 113 deletions.
27 changes: 13 additions & 14 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
about: Report any issues / bugs you've found. Could be a typo, visual issue, functional
issue, etc.
title: ''
labels: bug
assignees: ''

Expand All @@ -10,29 +11,27 @@ assignees: ''
**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
**Steps to reproduce**
Describe us how we could reproduce the bug you're trying to report.

Example:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.
A clear and concise description of what you expected to happen when you encounter the bug.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Device (please complete the following information):**

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
-OS: [e.g. iOS, Windows 10, ...]
-Browser: [e.g. Chrome 75, Safari 9]
-Package version: [e.g. 2.2.0]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
title: ''
labels: ''
assignees: ''

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
.nuxt

# local env files
.env.local
Expand Down
113 changes: 72 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,47 +95,48 @@ Here is an example of [UMD implementation](https://codepen.io/louismazel/pen/jQW

# Props API

| Props | Type | Required | Default |
| --------------------------- | ----------------- | -------- | ------------------------ |
| v-model | String | yes | - |
| format | String | no | 'YYYY-MM-DD hh:mm a' |
| formatted | String | no | 'llll' (momentjs format) |
| label | String | no | Select date & time |
| hint (1) | String | no | - |
| error (2) | Boolean | no | false |
| color (3) | String (hex) | no | dodgerblue |
| button-color (4) | String (hex) | no | #00C853 |
| position | String | no | null |
| locale (5) | String | no | Browser Locale |
| persistent | Boolean | no | false |
| minute-interval | Integer | no | 1 |
| output-format | String | no | null |
| only-time | Boolean | no | false |
| only-date | Boolean | no | false |
| no-label | Boolean | no | false |
| no-header | Boolean | no | false |
| no-value-to-custom-elem (6) | Boolean | no | false |
| min-date (7) | String | no | - |
| max-date (7) | String | no | - |
| no-weekends-days | Boolean | no | false |
| auto-close | Boolean | no | false |
| inline | Boolean | no | false |
| overlay | Boolean | no | false |
| range | Boolean | no | false |
| dark | Boolean | no | false |
| no-shortcuts | Boolean | no | false |
| no-button | Boolean | no | false |
| input-size | String (sm or lg) | no | null |
| button-now-translation | String | no | 'Now' |
| no-button-now | Boolean | no | false |
| first-day-of-week | Int (0 to 7) | no | - |
| disabled-dates (8) | Array`<string>` | no | [] |
| disabled-hours (9) | Array`<string>` | no | - |
| custom-shortcuts (10) | Array`<object>` | no | - |
| disabled-weekly (11) | Array`<integer>` | no | [] |
| no-keyboard (12) | Boolean | no | false |
| right (13) | Boolean | no | false |
| noClearButton | Boolean | no | false |
| Props | Type | Required | Default |
| --------------------------- | ----------------- | -------- | --------------------------- |
| v-model | String | yes | - |
| format | String | no | 'YYYY-MM-DD hh:mm a' |
| formatted | String | no | 'llll' (momentjs format) |
| label | String | no | Select date & time |
| hint (1) | String | no | - |
| error (2) | Boolean | no | false |
| color (3) | String (hex) | no | dodgerblue |
| button-color (4) | String (hex) | no | #00C853 |
| position | String | no | null |
| locale (5) | String | no | Browser Locale |
| persistent | Boolean | no | false |
| minute-interval | Integer | no | 1 |
| output-format | String | no | null |
| only-time | Boolean | no | false |
| only-date | Boolean | no | false |
| no-label | Boolean | no | false |
| no-header | Boolean | no | false |
| no-value-to-custom-elem (6) | Boolean | no | false |
| min-date (7) | String | no | - |
| max-date (7) | String | no | - |
| no-weekends-days | Boolean | no | false |
| auto-close | Boolean | no | false |
| inline | Boolean | no | false |
| overlay | Boolean | no | false |
| range | Boolean | no | false |
| dark | Boolean | no | false |
| no-shortcuts | Boolean | no | false |
| no-button | Boolean | no | false |
| input-size | String (sm or lg) | no | null |
| button-now-translation | String | no | 'Now' |
| no-button-now | Boolean | no | false |
| first-day-of-week | Int (0 to 7) | no | - |
| disabled-dates (8) | Array`<string>` | no | [] |
| disabled-hours (9) | Array`<string>` | no | - |
| custom-shortcuts (10) | Array`<object>` | no | - |
| disabled-weekly (11) | Array`<integer>` | no | [] |
| no-keyboard (12) | Boolean | no | false |
| right (13) | Boolean | no | false |
| noClearButton | Boolean | no | false |
| behaviour | Object | no | [See behaviour](#Behaviour) |

(1) hint : Is a text that replaces the label/placeholder (Ex : Error designation)

Expand Down Expand Up @@ -189,6 +190,36 @@ When you set `isSelected` to true, the shortcut is selected by default

> Any additionnal attribute passed to the component will be automatically be binded to the input component. (eg. if you passes a `type` attribute, the `<input>` will receive it).
## Behaviour

In order to avoid having too much properties in the component, We're adding a `behaviour` property that is an object including some annex behaviour values.

The default value for this object is:

```js
{
time: {
nearestIfDisabled: true;
}
}
```

To override those values, pass a new object with the values you want to override:

```html
<ctk-date-time-picker
:behaviour="{
time: {
nearestIfDisabled: false
}
}"
/>
```

| Behaviour | Description | Type | Default |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------- |
| time.nearestIfDisabled | If `true`, it will select the nearest available hour in the timepicker, if the current selected hour is disabled. Per example, if the hour is 12 but all the hours have been disabled until 14, then the 14 will be selected by default. Set `false` to disable this behaviour; the current hour will remain selected even if it has been disabled. The user cannot re-select it. | Boolean | true |

# Events API

| Event | Return |
Expand Down
1 change: 0 additions & 1 deletion docs/css/app.287c47e0.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/css/app.7704e930.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel=icon href=favicon.ico><title>vue-ctk-date-time-picker</title><link href=css/app.287c47e0.css rel=preload as=style><link href=js/app.b36ef963.js rel=preload as=script><link href=js/chunk-vendors.ee611b34.js rel=preload as=script><link href=css/app.287c47e0.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-ctk-date-time-picker doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.ee611b34.js></script><script src=js/app.b36ef963.js></script></body></html>
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel=icon href=favicon.ico><title>vue-ctk-date-time-picker</title><link href=css/app.7704e930.css rel=preload as=style><link href=js/app.8d1ac218.js rel=preload as=script><link href=js/chunk-vendors.c0d9cd47.js rel=preload as=script><link href=css/app.7704e930.css rel=stylesheet></head><body><noscript><strong>We're sorry but vue-ctk-date-time-picker doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.c0d9cd47.js></script><script src=js/app.8d1ac218.js></script></body></html>
2 changes: 2 additions & 0 deletions docs/js/app.8d1ac218.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/app.8d1ac218.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions docs/js/app.b36ef963.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/app.b36ef963.js.map

This file was deleted.

8 changes: 8 additions & 0 deletions docs/js/chunk-vendors.c0d9cd47.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/js/chunk-vendors.c0d9cd47.js.map

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions docs/js/chunk-vendors.ee611b34.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/js/chunk-vendors.ee611b34.js.map

This file was deleted.

11 changes: 11 additions & 0 deletions nuxt/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { resolve } = require('path')

module.exports = function VueCtkDateTimePicker () {
this.addPlugin({
ssr: false,
src: resolve(__dirname, 'plugin.js'),
fileName: 'vue-ctk-date-time-picker.js'
})
}

module.exports.meta = require(__dirname, './../package.json')
5 changes: 5 additions & 0 deletions nuxt/plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Vue from 'vue'
import VueCtkDateTimePicker from 'vue-ctk-date-time-picker'
import 'vue-ctk-date-time-picker/dist/vue-ctk-date-time-picker.css'

Vue.component('VueCtkDateTimePicker', VueCtkDateTimePicker)
Loading

0 comments on commit c35c54c

Please sign in to comment.