@imihai/angular-datetime-picker 21.0.0 → 21.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/assets/style/picker.min.css +1 -0
  2. package/fesm2022/imihai-angular-datetime-picker.mjs +5845 -0
  3. package/fesm2022/imihai-angular-datetime-picker.mjs.map +1 -0
  4. package/imihai-angular-datetime-picker-21.0.2.tgz +0 -0
  5. package/package.json +33 -77
  6. package/types/imihai-angular-datetime-picker.d.ts +2193 -0
  7. package/.browserslistrc +0 -9
  8. package/.editorconfig +0 -13
  9. package/.eslintrc.js +0 -208
  10. package/.github/workflows/ci_test.yml +0 -35
  11. package/.prettierrc +0 -2
  12. package/.travis.yml +0 -16
  13. package/LICENSE +0 -22
  14. package/README.md +0 -194
  15. package/angular.json +0 -221
  16. package/e2e/protractor.conf.js +0 -28
  17. package/e2e/src/app.e2e-spec.ts +0 -14
  18. package/e2e/src/app.po.ts +0 -11
  19. package/e2e/tsconfig.e2e.json +0 -13
  20. package/projects/picker/karma.conf.js +0 -62
  21. package/projects/picker/ng-package.json +0 -7
  22. package/projects/picker/package.json +0 -28
  23. package/projects/picker/src/lib/date-time/adapter/date-time-adapter.class.ts +0 -313
  24. package/projects/picker/src/lib/date-time/adapter/date-time-format.class.ts +0 -18
  25. package/projects/picker/src/lib/date-time/adapter/luxon-date-time-adapter.class.ts +0 -307
  26. package/projects/picker/src/lib/date-time/adapter/luxon-date-time-format.class.ts +0 -11
  27. package/projects/picker/src/lib/date-time/adapter/luxon-date-time.module.ts +0 -31
  28. package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-adapter.class.ts +0 -356
  29. package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time-format.class.ts +0 -14
  30. package/projects/picker/src/lib/date-time/adapter/unix-timestamp-adapter/unix-timestamp-date-time.module.ts +0 -26
  31. package/projects/picker/src/lib/date-time/calendar-body.component.html +0 -38
  32. package/projects/picker/src/lib/date-time/calendar-body.component.scss +0 -0
  33. package/projects/picker/src/lib/date-time/calendar-body.component.spec.ts +0 -120
  34. package/projects/picker/src/lib/date-time/calendar-body.component.ts +0 -190
  35. package/projects/picker/src/lib/date-time/calendar-month-view.component.html +0 -47
  36. package/projects/picker/src/lib/date-time/calendar-month-view.component.scss +0 -16
  37. package/projects/picker/src/lib/date-time/calendar-month-view.component.spec.ts +0 -394
  38. package/projects/picker/src/lib/date-time/calendar-month-view.component.ts +0 -705
  39. package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.html +0 -44
  40. package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.scss +0 -0
  41. package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.spec.ts +0 -343
  42. package/projects/picker/src/lib/date-time/calendar-multi-year-view.component.ts +0 -465
  43. package/projects/picker/src/lib/date-time/calendar-year-view.component.html +0 -16
  44. package/projects/picker/src/lib/date-time/calendar-year-view.component.scss +0 -0
  45. package/projects/picker/src/lib/date-time/calendar-year-view.component.spec.ts +0 -381
  46. package/projects/picker/src/lib/date-time/calendar-year-view.component.ts +0 -549
  47. package/projects/picker/src/lib/date-time/calendar.component.html +0 -169
  48. package/projects/picker/src/lib/date-time/calendar.component.scss +0 -0
  49. package/projects/picker/src/lib/date-time/calendar.component.spec.ts +0 -592
  50. package/projects/picker/src/lib/date-time/calendar.component.ts +0 -496
  51. package/projects/picker/src/lib/date-time/date-time-inline.component.html +0 -1
  52. package/projects/picker/src/lib/date-time/date-time-inline.component.scss +0 -4
  53. package/projects/picker/src/lib/date-time/date-time-inline.component.ts +0 -365
  54. package/projects/picker/src/lib/date-time/date-time-picker-animation-event.ts +0 -4
  55. package/projects/picker/src/lib/date-time/date-time-picker-container.component.html +0 -126
  56. package/projects/picker/src/lib/date-time/date-time-picker-container.component.scss +0 -0
  57. package/projects/picker/src/lib/date-time/date-time-picker-container.component.ts +0 -631
  58. package/projects/picker/src/lib/date-time/date-time-picker-input.directive.ts +0 -851
  59. package/projects/picker/src/lib/date-time/date-time-picker-intl.service.ts +0 -76
  60. package/projects/picker/src/lib/date-time/date-time-picker-trigger.directive.ts +0 -88
  61. package/projects/picker/src/lib/date-time/date-time-picker.component.html +0 -0
  62. package/projects/picker/src/lib/date-time/date-time-picker.component.scss +0 -0
  63. package/projects/picker/src/lib/date-time/date-time-picker.component.spec.ts +0 -2648
  64. package/projects/picker/src/lib/date-time/date-time-picker.component.ts +0 -731
  65. package/projects/picker/src/lib/date-time/date-time.class.ts +0 -256
  66. package/projects/picker/src/lib/date-time/date-time.module.ts +0 -61
  67. package/projects/picker/src/lib/date-time/numberedFixLen.pipe.ts +0 -28
  68. package/projects/picker/src/lib/date-time/options-provider.ts +0 -44
  69. package/projects/picker/src/lib/date-time/timer-box.component.html +0 -79
  70. package/projects/picker/src/lib/date-time/timer-box.component.scss +0 -0
  71. package/projects/picker/src/lib/date-time/timer-box.component.ts +0 -175
  72. package/projects/picker/src/lib/date-time/timer.component.html +0 -58
  73. package/projects/picker/src/lib/date-time/timer.component.scss +0 -0
  74. package/projects/picker/src/lib/date-time/timer.component.spec.ts +0 -399
  75. package/projects/picker/src/lib/date-time/timer.component.ts +0 -371
  76. package/projects/picker/src/lib/dialog/dialog-config.class.ts +0 -220
  77. package/projects/picker/src/lib/dialog/dialog-container.component.html +0 -1
  78. package/projects/picker/src/lib/dialog/dialog-container.component.scss +0 -0
  79. package/projects/picker/src/lib/dialog/dialog-container.component.ts +0 -231
  80. package/projects/picker/src/lib/dialog/dialog-ref.class.ts +0 -178
  81. package/projects/picker/src/lib/dialog/dialog.module.ts +0 -25
  82. package/projects/picker/src/lib/dialog/dialog.service.ts +0 -353
  83. package/projects/picker/src/lib/utils/array.utils.ts +0 -12
  84. package/projects/picker/src/lib/utils/constants.ts +0 -59
  85. package/projects/picker/src/lib/utils/date.utils.ts +0 -97
  86. package/projects/picker/src/lib/utils/index.ts +0 -5
  87. package/projects/picker/src/lib/utils/object.utils.ts +0 -29
  88. package/projects/picker/src/public_api.ts +0 -56
  89. package/projects/picker/src/sass/picker.scss +0 -743
  90. package/projects/picker/src/test-helpers.ts +0 -125
  91. package/projects/picker/src/test.ts +0 -52
  92. package/projects/picker/tsconfig.lib.json +0 -18
  93. package/projects/picker/tsconfig.lib.prod.json +0 -7
  94. package/projects/picker/tsconfig.spec.json +0 -17
  95. package/projects/picker/tslint.json +0 -8
  96. package/src/app/app.component.html +0 -77
  97. package/src/app/app.component.scss +0 -32
  98. package/src/app/app.component.spec.ts +0 -16
  99. package/src/app/app.component.ts +0 -35
  100. package/src/assets/.gitkeep +0 -0
  101. package/src/environments/environment.prod.ts +0 -3
  102. package/src/environments/environment.ts +0 -16
  103. package/src/favicon.ico +0 -0
  104. package/src/index.html +0 -14
  105. package/src/karma.conf.js +0 -31
  106. package/src/main.ts +0 -16
  107. package/src/polyfills.ts +0 -53
  108. package/src/styles.scss +0 -7
  109. package/src/test.ts +0 -50
  110. package/src/tsconfig.app.json +0 -16
  111. package/src/tsconfig.spec.json +0 -18
  112. package/src/tslint.json +0 -17
  113. package/tsconfig.base.json +0 -29
  114. package/tsconfig.json +0 -30
  115. package/tslint.json +0 -130
package/.browserslistrc DELETED
@@ -1,9 +0,0 @@
1
- # Default Angular browser support
2
- # See: https://angular.dev/tools/cli/build#configuring-browser-compatibility
3
- # And: https://angular.dev/reference/versions#browser-support
4
- last 2 Chrome versions
5
- last 1 Firefox version
6
- last 2 Edge major versions
7
- last 2 Safari major versions
8
- last 2 iOS major versions
9
- Firefox ESR
package/.editorconfig DELETED
@@ -1,13 +0,0 @@
1
- # Editor configuration, see http://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 4
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
-
11
- [*.md]
12
- max_line_length = off
13
- trim_trailing_whitespace = false
package/.eslintrc.js DELETED
@@ -1,208 +0,0 @@
1
- /*
2
- 👋 Hi! This file was autogenerated by tslint-to-eslint-config.
3
- https://github.com/typescript-eslint/tslint-to-eslint-config
4
-
5
- It represents the closest reasonable ESLint configuration to this
6
- project's original TSLint configuration.
7
-
8
- We recommend eventually switching this configuration to extend from
9
- the recommended rulesets in typescript-eslint.
10
- https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
11
-
12
- Happy linting! 💖
13
- */
14
- module.exports = {
15
- "env": {
16
- "browser": true,
17
- "node": true
18
- },
19
- "parser": "@typescript-eslint/parser",
20
- "parserOptions": {
21
- "project": "tsconfig.json",
22
- "sourceType": "module"
23
- },
24
- "plugins": [
25
- "eslint-plugin-import",
26
- "eslint-plugin-jsdoc",
27
- "@angular-eslint/eslint-plugin",
28
- "@typescript-eslint",
29
- "@typescript-eslint/tslint"
30
- ],
31
- "root": true,
32
- "rules": {
33
- "@angular-eslint/component-class-suffix": "error",
34
- "@angular-eslint/directive-class-suffix": "error",
35
- "@angular-eslint/no-host-metadata-property": "error",
36
- "@angular-eslint/no-input-rename": "error",
37
- "@angular-eslint/no-inputs-metadata-property": "error",
38
- "@angular-eslint/no-output-on-prefix": "error",
39
- "@angular-eslint/no-output-rename": "error",
40
- "@angular-eslint/no-outputs-metadata-property": "error",
41
- "@angular-eslint/use-lifecycle-interface": "error",
42
- "@angular-eslint/use-pipe-transform-interface": "error",
43
- "@typescript-eslint/consistent-type-definitions": "error",
44
- "@typescript-eslint/dot-notation": "off",
45
- "@typescript-eslint/explicit-member-accessibility": [
46
- "off",
47
- {
48
- "accessibility": "explicit"
49
- }
50
- ],
51
- "@typescript-eslint/indent": "error",
52
- "@typescript-eslint/member-delimiter-style": [
53
- "error",
54
- {
55
- "multiline": {
56
- "delimiter": "semi",
57
- "requireLast": true
58
- },
59
- "singleline": {
60
- "delimiter": "semi",
61
- "requireLast": false
62
- }
63
- }
64
- ],
65
- "@typescript-eslint/member-ordering": "error",
66
- "@typescript-eslint/naming-convention": [
67
- "error",
68
- {
69
- "selector": "variable",
70
- "format": [
71
- "camelCase",
72
- "UPPER_CASE"
73
- ],
74
- "leadingUnderscore": "forbid",
75
- "trailingUnderscore": "forbid"
76
- }
77
- ],
78
- "@typescript-eslint/no-empty-function": "off",
79
- "@typescript-eslint/no-empty-interface": "error",
80
- "@typescript-eslint/no-inferrable-types": [
81
- "error",
82
- {
83
- "ignoreParameters": true
84
- }
85
- ],
86
- "@typescript-eslint/no-misused-new": "error",
87
- "@typescript-eslint/no-non-null-assertion": "error",
88
- "@typescript-eslint/no-shadow": [
89
- "error",
90
- {
91
- "hoist": "all"
92
- }
93
- ],
94
- "@typescript-eslint/no-unused-expressions": "error",
95
- "@typescript-eslint/prefer-function-type": "error",
96
- "@typescript-eslint/quotes": [
97
- "error",
98
- "single"
99
- ],
100
- "@typescript-eslint/semi": [
101
- "error",
102
- "always"
103
- ],
104
- "@typescript-eslint/type-annotation-spacing": "error",
105
- "@typescript-eslint/unified-signatures": "error",
106
- "arrow-body-style": "error",
107
- "brace-style": [
108
- "error",
109
- "1tbs"
110
- ],
111
- "constructor-super": "error",
112
- "curly": "error",
113
- "dot-notation": "off",
114
- "eol-last": "error",
115
- "eqeqeq": [
116
- "error",
117
- "smart"
118
- ],
119
- "guard-for-in": "error",
120
- "id-denylist": "off",
121
- "id-match": "off",
122
- "import/no-deprecated": "warn",
123
- "indent": "off",
124
- "jsdoc/no-types": "error",
125
- "max-len": [
126
- "error",
127
- {
128
- "code": 140
129
- }
130
- ],
131
- "no-bitwise": "error",
132
- "no-caller": "error",
133
- "no-console": [
134
- "error",
135
- {
136
- "allow": [
137
- "log",
138
- "warn",
139
- "error",
140
- "dir",
141
- "timeLog",
142
- "assert",
143
- "clear",
144
- "count",
145
- "countReset",
146
- "group",
147
- "groupEnd",
148
- "table",
149
- "dirxml",
150
- "groupCollapsed",
151
- "Console",
152
- "profile",
153
- "profileEnd",
154
- "timeStamp",
155
- "context",
156
- "createTask"
157
- ]
158
- }
159
- ],
160
- "no-debugger": "error",
161
- "no-empty": "off",
162
- "no-empty-function": "off",
163
- "no-eval": "error",
164
- "no-fallthrough": "error",
165
- "no-new-wrappers": "error",
166
- "no-restricted-imports": [
167
- "error",
168
- "rxjs/Rx"
169
- ],
170
- "no-shadow": "off",
171
- "no-throw-literal": "error",
172
- "no-trailing-spaces": "error",
173
- "no-undef-init": "error",
174
- "no-underscore-dangle": "off",
175
- "no-unused-expressions": "off",
176
- "no-unused-labels": "error",
177
- "no-var": "error",
178
- "prefer-const": "error",
179
- "quotes": "off",
180
- "radix": "error",
181
- "semi": "off",
182
- "spaced-comment": [
183
- "error",
184
- "always",
185
- {
186
- "markers": [
187
- "/"
188
- ]
189
- }
190
- ],
191
- "@typescript-eslint/tslint/config": [
192
- "error",
193
- {
194
- "rules": {
195
- "import-spacing": true,
196
- "whitespace": [
197
- true,
198
- "check-branch",
199
- "check-decl",
200
- "check-operator",
201
- "check-separator",
202
- "check-type"
203
- ]
204
- }
205
- }
206
- ]
207
- }
208
- };
@@ -1,35 +0,0 @@
1
- name: CI Test
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- paths-ignore:
7
- - '*.md'
8
- - '.github/**'
9
- pull_request:
10
- branches: [ master ]
11
- paths-ignore:
12
- - '*.md'
13
- - '.github/**'
14
-
15
- workflow_dispatch:
16
-
17
- jobs:
18
- build:
19
- runs-on: ubuntu-latest
20
- steps:
21
- - uses: actions/checkout@v4
22
- - name: Upgrade Chrome browser
23
- run: |
24
- sudo apt-get update
25
- sudo apt-get --only-upgrade install google-chrome-stable
26
- - name: Use Node.js
27
- uses: actions/setup-node@v4
28
- with:
29
- node-version: lts/*
30
- - name: Install dependencies
31
- run: npm ci --include=optional
32
- - name: Run tests
33
- run: npm run test:ci
34
- env:
35
- CI: true
package/.prettierrc DELETED
@@ -1,2 +0,0 @@
1
- tabWidth: 4
2
- singleQuote: true
package/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - "10"
4
- cache:
5
- directories:
6
- - ./node_modules
7
- addons:
8
- chrome: stable
9
- before_script:
10
- - npm install -g @angular/cli@19
11
- - npm install
12
- script:
13
- - npm run test-with-coverage
14
- after_success:
15
- - ./node_modules/.bin/codecov -f coverage-final.json
16
- sudo: required
package/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- The MIT License
2
-
3
- Copyright (c) 2014-2016 Daniel YK Pan.
4
- Copyright (c) 2020 Daniel Moncada.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- THE SOFTWARE.
package/README.md DELETED
@@ -1,194 +0,0 @@
1
- # :date: :clock1: Angular Date/Time Picker
2
-
3
- [![npm](https://img.shields.io/npm/v/@danielmoncada/angular-datetime-picker.svg?maxAge=2592000?style=flat-square)](https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker)
4
- [![npm](https://img.shields.io/npm/dm/@danielmoncada/angular-datetime-picker.svg)](https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker)
5
-
6
- **The current version of this package supports Angular 21**
7
-
8
- If you need support for other Angular version, see _Breaking Changes_ below.
9
-
10
- ## Breaking Changes
11
-
12
- - Version 21.x.x is the official release for Angular 21 and it also supports Angular 20.
13
- - Version 20.x.x is the official release for Angular 20 and it also supports Angular 19.
14
- - Version 19.x.x >= no longer supports ng 18. If you need ng 18 support, stick with version 18.x.x.
15
- - Version 18.x.x >= no longer supports ng 17. If you need ng 17 support, stick with version 17.x.x.
16
- - Version 17.x.x >= no longer supports ng 16 - 13. If you need ng 16-13 support, stick with version 16.x.x.
17
- - Version 14.x.x >= no longer supports < ng 13. If you need View Engine support, stick with version 13.x.x.
18
- - Version 13.1.0+ no longer supports the `MomentJs` time adapter natively. If you want to use the MomentJs adapter, see [GitHub](https://github.com/danielmoncada/date-time-picker-moment-adapter) or [npm](https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker-moment-adapter).
19
- - If you need ng 8 support, please stick with: https://github.com/DanielYKPan/date-time-picker
20
-
21
- ## Description
22
-
23
- Simple Angular date time picker. Online doc is [here](https://daniel-projects.firebaseapp.com/owlng/date-time-picker), Online demos(StackBlitz) are [here](https://stackblitz.com/edit/angular-vvp849) and [here](https://stackblitz.com/edit/angular-i7ykf5).
24
- This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices.
25
-
26
- ## How to Use
27
-
28
- 1. Install with [npm](https://www.npmjs.com): `npm install @danielmoncada/angular-datetime-picker --save`
29
- 2. Add styles.
30
- If you are using Angular CLI, you can add this to your styles.css:
31
- ```css
32
- @import '@danielmoncada/angular-datetime-picker/assets/style/picker.min.css';
33
- ```
34
- If you are not using the Angular CLI, you can include the picker.min.css via a `<link>` element in your index.html.
35
- 3. Add **OwlDateTimeModule** and **OwlNativeDateTimeModule** to your **@NgModule** like example below
36
-
37
- ```typescript
38
- import { NgModule } from '@angular/core';
39
- import { BrowserModule } from '@angular/platform-browser';
40
- import { MyTestApp } from './my-test-app';
41
- import { OwlDateTimeModule, OwlNativeDateTimeModule } from '@danielmoncada/angular-datetime-picker';
42
-
43
- @NgModule({
44
- imports: [BrowserModule, OwlDateTimeModule, OwlNativeDateTimeModule],
45
- declarations: [MyTestApp],
46
- bootstrap: [MyTestApp],
47
- })
48
- export class MyTestAppModule {}
49
- ```
50
-
51
- 4. Connecting a picker to an input and a trigger.
52
- ```html
53
- <input [owlDateTime]="dt1" [owlDateTimeTrigger]="dt1" placeholder="Date Time" /> <owl-date-time #dt1></owl-date-time>
54
- ```
55
- ```html
56
- <input [owlDateTime]="dt2" placeholder="Date Time" />
57
- <span [owlDateTimeTrigger]="dt2"><i class="fa fa-calendar"></i></span>
58
- <owl-date-time #dt2></owl-date-time>
59
- ```
60
- The examples above are quite basic. The picker has much more features,
61
- and you could learn more about those from [demo page](https://danielykpan.github.io/date-time-picker/).
62
-
63
- ## Choose a date implementation
64
-
65
- The date-time picker was built to be date implementation agnostic.
66
- Developers need to make sure to provide the appropriate pieces for the picker to work with their chosen implementation.
67
- There are two pre-made modules, users need to import one of them or build your own one (learn more about this from [here](https://danielykpan.github.io/date-time-picker/#locale-formats)).
68
-
69
- - `OwlNativeDateTimeModule` - support for native JavaScript Date object
70
- - `OwlUnixTimestampDateTimeModule` - support for milliseconds since Epoch (number)
71
-
72
- ##### Date/Time Adapter Extensions
73
-
74
- <img src="https://day.js.org/img/logo.png" width="50"/> https://day.js.org/
75
-
76
- - `OwlDayJsDateTimeModule` - support for DayJs
77
- - You must install an optional adapater to use this. see [here](https://github.com/danielmoncada/date-time-picker-dayjs-adapter), [npm](https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker-dayjs-adapter)
78
-
79
- <img src="https://avatars.githubusercontent.com/u/4129662?s=200&v=4" width="50"/> https://momentjs.com/
80
-
81
- - `OwlMomentDateTimeModule` - support for MomentJs
82
- - You must install an optional adapater to use this. see [here](https://github.com/danielmoncada/date-time-picker-moment-adapter), [npm](https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker-moment-adapter)
83
-
84
- ## Properties for `owl-date-time`
85
-
86
- | Name | Type | Required | Default | Description |
87
- | :------------------ | :---------------------------- | :------- | :-------------------- | :------------------------------------------------------------------------------------------------------------------------------------------- |
88
- | `pickerType` | `both`, `calendar`, `timer` | Optional | `both` | Set the type of the dateTime picker. `both`: show both calendar and timer, `calendar`: only show calendar, `timer`: only show timer. |
89
- | `pickerMode` | `popup`, `dialog` | Optional | `popup` | The style the picker would open as. |
90
- | `startView` | `month`, `year`, `multi-year` | Optional | `month` | The view that the calendar should start in. |
91
- | `yearOnly` | boolean | Optional | `false` | Restricts the calendar to only show the year and multi-year views for month selection. |
92
- | `showCalendarWeeks` | boolean | Optional | `false` | Whether to show calendar weeks in the calendar. |
93
- | `multiyearOnly` | boolean | Optional | `false` | Restricts the calendar to only show the multi-year view for year selection. |
94
- | `startAt` | T/null | Optional | `null` | The moment to open the picker to initially. |
95
- | `endAt` | T/null | Optional | `null` | The the default selected time for range calendar end time |
96
- | `firstDayOfWeek` | number | Optional | `0` | Set the first day of week. Valid value is from 0 to 6. 0: Sunday - 6: Saturday |
97
- | `showSecondsTimer` | boolean | Optional | `false` | When specify it to true, it would show a timer to configure the second's value |
98
- | `hideOtherMonths` | boolean | Optional | `false` | Whether to hide dates in other months at the start or end of the current month |
99
- | `hour12Timer` | boolean | Optional | `false` | When specify it to true, the timer would be in hour12 format mode |
100
- | `stepHour` | number | Optional | `1` | Hours to change per step. |
101
- | `stepMinute` | number | Optional | `1` | Minutes to change per step. |
102
- | `stepSecond` | number | Optional | `1` | Seconds to change per step. |
103
- | `scrollStrategy` | ScrollStrategy | Optional | `BlockScrollStrategy` | Define the scroll strategy when the picker is open. Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies. |
104
- | `disabled` | boolean | Optional | `false` | When specify to true, it would disable the picker. |
105
- | `backdropClass` | string/string[] | Optional | `null` | Custom class for the picker backdrop. |
106
- | `panelClass` | string/string[] | Optional | `null` | Custom class for the picker overlay panel. |
107
-
108
- ## Events for `owl-date-time`
109
-
110
- | Events | Parameter | Description |
111
- | :------------------ | :-------- | :---------------------------------------------------------------------------------------------- |
112
- | `beforePickerOpen` | null | Callback to invoke before the picker is opened |
113
- | `afterPickerOpen` | null | Callback to invoke when the picker is opened |
114
- | `afterPickerClosed` | null | Callback to invoke when the picker is closed. |
115
- | `yearSelected` | T | Callback to invoke when the year is selected.This doesn't imply a change on the selected date. |
116
- | `monthSelected` | T | Callback to invoke when the month is selected.This doesn't imply a change on the selected date. |
117
- | `dateClicked` | T | Callback when the selected data changes. |
118
- | `selectedChanged` | T | Callback when the currently selected data changes. |
119
- | `userSelection` | null | Callback when any date is selected. |
120
-
121
- ## Properties for `input[owlDateTime]`
122
-
123
- | Name | Type | Required | Default | Description |
124
- | :------------------ | :---------------------------------------- | :------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
125
- | `owlDateTime` | `OwlDateTimeComponent<T>` | Require | `null` | The date time picker that this input is associated with. |
126
- | `owlDateTimeFilter` | `( date: T)=>boolean ` | Optional | `null` | A function to filter date time. |
127
- | `disabled` | boolean | Optional | `false` | When specify to true, it would disable the picker's input. |
128
- | `min` | `<T>` | Optional | `null` | The minimum valid date time. |
129
- | `max` | `<T>` | Optional | `null` | The maximum valid date time. |
130
- | `selectMode` | `single`, `range`, `rangeFrom`, `rangeTo` | Optional | `single` | Specify the picker's select mode. `single`: a single value allowed, `range`: allow users to select a range of date-time, `rangeFrom`: the input would only show the 'from' value and the picker could only selects 'from' value, `rangeTo`: the input would only show the 'to' value and the picker could only selects 'to' value. |
131
- | `rangeSeparator` | string | Optional | `-` | The character to separate the 'from' and 'to' in input value in range selectMode. |
132
-
133
- ## Events for `input[owlDateTime]`
134
-
135
- | Events | Parameter | Description |
136
- | :--------------- | :--------------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
137
- | `dateTimeChange` | source: OwlDateTimeInput, value: input value, input: the input element | Callback to invoke when `change` event is fired on this `<input [owlDateTime]>` |
138
- | `dateTimeInput` | source: OwlDateTimeInput, value: input value, input: the input element | Callback to invoke when an `input` event is fired on this `<input [owlDateTime]>`. |
139
-
140
- ## Properties for `[owlDateTimeTrigger]`
141
-
142
- | Name | Type | Required | Default | Description |
143
- | :------------------- | :------------------------ | :------- | :------ | :--------------------------------------------------------- |
144
- | `owlDateTimeTrigger` | `OwlDateTimeComponent<T>` | Require | `null` | The date time picker that this trigger is associated with. |
145
- | `disabled` | boolean | Optional | `false` | When specify to true, it would disable the trigger. |
146
-
147
- ## Properties for `[owlDateTimeTrigger]`
148
-
149
- | Name | Type | Required | Default | Description |
150
- | :------------------- | :------------------------ | :------- | :------ | :--------------------------------------------------------- |
151
- | `owlDateTimeTrigger` | `OwlDateTimeComponent<T>` | Require | `null` | The date time picker that this trigger is associated with. |
152
- | `disabled` | boolean | Optional | `false` | When specify to true, it would disable the trigger. |
153
-
154
- ## Properties for `owl-date-time-inline`
155
-
156
- | Name | Type | Required | Default | Description |
157
- | :------------------ | :---------------------------------------- | :------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
158
- | `pickerType` | `both`, `calendar`, `timer` | Optional | `both` | Set the type of the dateTime picker. `both`: show both calendar and timer, `calendar`: only show calendar, `timer`: only show timer. |
159
- | `startView` | `month`, `year`, `multi-year` | Optional | `month` | The view that the calendar should start in. |
160
- | `startAt` | T/null | Optional | `null` | The moment to open the picker to initially. |
161
- | `endAt` | T/null | Optional | `null` | The the default selected time for range calendar end time |
162
- | `firstDayOfWeek` | number | Optional | `0` | Set the first day of week. Valid value is from 0 to 6. 0: Sunday - 6: Saturday |
163
- | `showSecondsTimer` | boolean | Optional | `false` | When specify it to true, it would show a timer to configure the second's value |
164
- | `hideOtherMonths` | boolean | Optional | `false` | Whether to hide dates in other months at the start or end of the current month |
165
- | `hour12Timer` | boolean | Optional | `false` | When specify it to true, the timer would be in hour12 format mode |
166
- | `stepHour` | number | Optional | `1` | Hours to change per step. |
167
- | `stepMinute` | number | Optional | `1` | Minutes to change per step. |
168
- | `stepSecond` | number | Optional | `1` | Seconds to change per step. |
169
- | `disabled` | boolean | Optional | `false` | When specify to true, it would disable the picker. |
170
- | `owlDateTimeFilter` | `( date: T)=>boolean ` | Optional | `null` | A function to filter date time. |
171
- | `min` | `<T>` | Optional | `null` | The minimum valid date time. |
172
- | `max` | `<T>` | Optional | `null` | The maximum valid date time. |
173
- | `selectMode` | `single`, `range`, `rangeFrom`, `rangeTo` | Optional | `single` | Specify the picker's select mode. `single`: a single value allowed, `range`: allow users to select a range of date-time, `rangeFrom`: the input would only show the 'from' value and the picker could only selects 'from' value, `rangeTo`: the input would only show the 'to' value and the picker could only selects 'to' value. |
174
-
175
- ## Localization and DateTime Format
176
-
177
- Localization for different languages and formats is defined by `OWL_DATE_TIME_LOCALE` and `OWL_DATE_TIME_FORMATS`. You could learn more about this from [here](https://danielykpan.github.io/date-time-picker#locale-formats).
178
-
179
- ## Dependencies
180
-
181
- none
182
-
183
- ## Demo
184
-
185
- - Online doc is [here](https://daniel-projects.firebaseapp.com/owlng/date-time-picker)
186
- - Online demos (StackBlitz) are [here](https://stackblitz.com/edit/angular-vvp849) and [here](https://stackblitz.com/edit/angular-i7ykf5)
187
-
188
- ## License
189
-
190
- - License: MIT
191
-
192
- ## Author
193
-
194
- **Maintained and updated by Daniel Moncada, original implementatiom by Daniel Pan**