├── .editorconfig
├── .eslintrc.json
├── .github
├── ISSUE_TEMPLATE
│ ├── bug.md
│ ├── feature.md
│ └── question.md
├── contributing.md
├── pull_request_template.md
└── workflows
│ └── test.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.es_MX.md
├── README.md
├── angular.json
├── cypress.config.ts
├── cypress
├── e2e
│ └── date-time-picker.cy.ts
├── po
│ ├── app.po.ts
│ └── date-time-picker.po.ts
└── tsconfig.json
├── images
└── coverage-badge.svg
├── ng-package.json
├── package-lock.json
├── package.json
├── screenshots
├── day.png
├── hour.png
├── minute.png
├── month.png
├── stars.png
└── year.png
├── scss-bundle.config.json
├── src
├── app
│ ├── app.component.html
│ ├── app.component.scss
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ └── app.module.ts
├── assets
│ └── .gitkeep
├── browserslist
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── karma.conf.js
├── lib
│ ├── core
│ │ ├── README.md
│ │ ├── dl-date-adapter-moment.ts
│ │ ├── dl-date-adapter-native.ts
│ │ ├── dl-date-adapter-number.ts
│ │ ├── dl-date-adapter-string.spec.ts
│ │ ├── dl-date-adapter-string.ts
│ │ ├── dl-date-adapter.ts
│ │ ├── dl-date-time-core.module.ts
│ │ ├── dl-date-time-string-format.ts
│ │ └── public-api.ts
│ ├── dl-date-time-input
│ │ ├── README.md
│ │ ├── dl-date-time-input-change.ts
│ │ ├── dl-date-time-input.directive.md
│ │ ├── dl-date-time-input.directive.ts
│ │ ├── dl-date-time-input.module.ts
│ │ ├── public-api.ts
│ │ └── specs
│ │ │ ├── dl-date-time-input.directive.spec.ts
│ │ │ └── model-type
│ │ │ ├── model-type-date.spec.ts
│ │ │ ├── model-type-moment.spec.ts
│ │ │ ├── model-type-number.spec.ts
│ │ │ └── model-type-string.spec.ts
│ ├── dl-date-time-picker
│ │ ├── README.md
│ │ ├── dl-date-time-picker-change.ts
│ │ ├── dl-date-time-picker-date-button.ts
│ │ ├── dl-date-time-picker-model.ts
│ │ ├── dl-date-time-picker.component.html
│ │ ├── dl-date-time-picker.component.md
│ │ ├── dl-date-time-picker.component.scss
│ │ ├── dl-date-time-picker.component.ts
│ │ ├── dl-date-time-picker.module.ts
│ │ ├── dl-model-provider-day.ts
│ │ ├── dl-model-provider-hour.ts
│ │ ├── dl-model-provider-minute.ts
│ │ ├── dl-model-provider-month.ts
│ │ ├── dl-model-provider-year.ts
│ │ ├── dl-model-provider.ts
│ │ ├── public-api.ts
│ │ └── specs
│ │ │ ├── button-classes
│ │ │ └── button-classes.spec.ts
│ │ │ ├── dispatch-events.ts
│ │ │ ├── max-view
│ │ │ └── max-view.spec.ts
│ │ │ ├── min-view
│ │ │ └── min-view.spec.ts
│ │ │ ├── minute-step
│ │ │ └── minute-step.spec.ts
│ │ │ ├── model-type
│ │ │ ├── model-type-date.spec.ts
│ │ │ ├── model-type-moment.spec.ts
│ │ │ ├── model-type-number.spec.ts
│ │ │ └── model-type-string.spec.ts
│ │ │ ├── month-constants.ts
│ │ │ ├── ng-model
│ │ │ └── ng-model.spec.ts
│ │ │ ├── select-filter
│ │ │ └── select-filter.spec.ts
│ │ │ ├── start-date
│ │ │ └── start-date.spec.ts
│ │ │ └── start-view
│ │ │ ├── day-view.spec.ts
│ │ │ ├── hour-view.spec.ts
│ │ │ ├── minute-view.spec.ts
│ │ │ ├── month-view.spec.ts
│ │ │ └── year-view.spec.ts
│ ├── index.ts
│ ├── public-api.ts
│ └── tsconfig.lib.json
├── main.ts
├── polyfills.ts
├── scss
│ └── _variables.scss
├── styles.scss
├── test.ts
├── tsconfig.app.json
├── tsconfig.doc.json
└── tsconfig.spec.json
└── tsconfig.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "root": true,
3 | "ignorePatterns": [
4 | "projects/**/*"
5 | ],
6 | "overrides": [
7 | {
8 | "files": [
9 | "*.ts"
10 | ],
11 | "parserOptions": {
12 | "project": [
13 | "tsconfig.json"
14 | ],
15 | "createDefaultProgram": true
16 | },
17 | "extends": [
18 | "plugin:@angular-eslint/recommended",
19 | "plugin:@angular-eslint/template/process-inline-templates"
20 | ],
21 | "rules": {
22 | "@angular-eslint/directive-selector": [
23 | "error",
24 | {
25 | "type": "attribute",
26 | "prefix": "dl",
27 | "style": "camelCase"
28 | }
29 | ],
30 | "@angular-eslint/component-selector": [
31 | "error",
32 | {
33 | "type": "element",
34 | "prefix": "dl",
35 | "style": "kebab-case"
36 | }
37 | ],
38 | "@typescript-eslint/no-unused-vars": [
39 | "error",
40 | {
41 | "argsIgnorePattern": "^_"
42 | }
43 | ]
44 | }
45 | },
46 | {
47 | "files": [
48 | "*.html"
49 | ],
50 | "extends": [
51 | "plugin:@angular-eslint/template/recommended"
52 | ],
53 | "rules": {}
54 | }
55 | ]
56 | }
57 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug
3 | about: Report a bug found in angular-bootstrap-datetimepicker or the docs
4 |
5 | ---
6 |
7 | #### What is the expected behavior?
8 |
9 |
10 | #### What is the current behavior?
11 |
12 |
13 | #### What are the steps to reproduce?
14 | Providing a StackBlitz reproduction is the *best* way to share your issue.
15 | You can fork the demo on StackBlitz: https://stackblitz.com/github/dalelotts/angular-bootstrap-datetimepicker-demo
16 |
17 |
18 | #### Which versions of angular-bootstrap-datetimepicker, OS, TypeScript, browsers are affected?
19 |
20 |
21 | #### Is there anything else we should know?
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature
3 | about: Propose a new feature for angular-bootstrap-datetimepicker
4 |
5 | ---
6 |
7 | #### Please describe the feature you would like to request.
8 |
9 |
10 | #### What is the use-case or motivation for this proposal?
11 |
12 |
13 | #### Is there anything else I should know?
14 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Ask a question about how to use angular-bootstrap-datetimepicker
4 |
5 | ---
6 |
7 | # Please do not ask questions here
8 |
9 | A support question starts with `how`, `why`, or some other statement indicating you are trying to understand how to use this component.
10 |
11 | **This repository's issues are reserved for feature requests and bug reports.**
12 |
13 | **Support questions here will be CLOSED without explanation.**
14 |
15 | For support questions, please use one of these channels:
16 |
17 | - Gitter: https://gitter.im/dalelotts/angular-bootstrap-datetimepicker
18 | - Stack Overflow: http://stackoverflow.com/search?q=angular-bootstrap-datetimepicker
19 |
--------------------------------------------------------------------------------
/.github/contributing.md:
--------------------------------------------------------------------------------
1 | Submitting Issues
2 | =================
3 |
4 | If you are submitting a bug, please create a [jsfiddle](http://jsfiddle.net/) demonstrating the issue.
5 |
6 | Contributing code
7 | =================
8 |
9 | To contribute, fork the library and install gulp and dependencies. You need [node](http://nodejs.org/); use [nvm](https://github.com/creationix/nvm) or [nenv](https://github.com/ryuone/nenv) to install it.
10 |
11 | ```shell
12 | git clone https://github.com/dalelotts/angular-bootstrap-datetimepicker.git
13 | cd angular-bootstrap-datetimepicker
14 | npm install
15 | git checkout -b my-fix-branch develop # all patches against develop branch, please!
16 | npm test # this runs lint, complexity checks, and unit tests.
17 | ```
18 |
19 | Very important notes
20 | ====================
21 |
22 | * **Pull pull requests to the `master` branch will be closed.** Please submit all pull requests to the `develop` branch.
23 | * **Pull requests will not be merged without unit tests.**
24 | * **Do not include the minified files in your pull request.**
25 | * **Have good tests. If you don't have tests for every line and branch in your changes, I won't accept the PR.
26 | * **If your PR fails the CI build, I won't look at it.
27 |
28 | Gulp tasks
29 | ===========
30 |
31 | We use Gulp for managing the build. Here are some useful Gulp tasks:
32 |
33 | * `npm test` Runs all tests (webpack, commonjs, etc) checks the coding style, lints the code, calculates complexity, runs all tests, and enforces code coverage. You should make sure you do this before submitting a PR.
34 | * `gulp` The default task checks the coding style, lints the code, calculates complexity, runs the tests (not webpack or commonJS tests), and enforces code coverage.
35 | * `gulp scss` Generates the css file from the source scss.
36 | * `gulp css-lint` Lint the css files after generating.
37 | * `gulp templatecache` Generates src/js/datetimepicker.templates.js. You must re-add the IIFE around the generated code after it is generated (PR to fix this would be apprecaited)
38 |
39 | # Contributing to angular-bootstrap-datetimepicker
40 |
41 | We'd love for you to contribute to our source code and to make angular-bootstrap-datetimepicker even better than it is
42 | today! Here are the guidelines we'd like you to follow:
43 |
44 | - [Question or Problem?](#question)
45 | - [Issues and Bugs](#issue)
46 | - [Feature Requests](#feature)
47 | - [Submission Guidelines](#submit)
48 | - [Coding Rules](#rules)
49 | - [Commit Message Guidelines](#commit)
50 | - [Signing the CLA](#cla)
51 | - [Further Info](#info)
52 |
53 | ## Got a Question or Problem?
54 |
55 | If you have questions about how to use angular-bootstrap-datetimepicker, please direct these to the [Gitter Chat Group][gitter].
56 |
57 | ## Found an Issue?
58 |
59 | If you find a bug in the source code or a mistake in the documentation, you can help us by
60 | submitting an issue to our [GitHub Repository][issues]. Even better you can submit a Pull Request
61 | with a fix.
62 |
63 | **Localization Issues:** This directive uses the [Moment][momentI18N] for all localization.
64 | This means that any localization issues should be reproted to Moment.
65 |
66 | **Please see the [Submission Guidelines](#submit) below.**
67 |
68 | ## Want a Feature?
69 |
70 | You can request a new feature by submitting an issue to our [GitHub Repository][github]. If you
71 | would like to implement a new feature then consider what kind of change it is:
72 |
73 | * **Major Changes** that you wish to contribute to the project should be discussed first on [Gitter Chat][gitter]
74 | so that we can better coordinate our efforts, prevent duplication of work, and help you to craft the
75 | change so that it is successfully accepted into the project.
76 | * **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull
77 | Request.
78 |
79 |
80 | ## Want a Doc Fix?
81 |
82 | If you want to help improve the docs, submit a PR.
83 |
84 | When naming the commit, it is advised to follow the commit message
85 | guidelines below, by starting the commit message with **docs** and
86 | reference the filename and follows the **[Commit Message Guidelines](#commit)** outlined below.
87 |
88 | ## Submission Guidelines
89 |
90 | ### Submitting an Issue
91 | Before you submit your issue search the archive, maybe your question was already answered.
92 |
93 | If your issue appears to be a bug, and hasn't been reported, open a new issue. Help us to maximize
94 | the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
95 | Providing the following information will increase the chances of your issue being dealt with
96 | quickly:
97 |
98 | * **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
99 | * **Motivation for or Use Case** - explain why this is a bug for you
100 | * **Angular Version(s)** - is it a regression?
101 | * **Browsers and Operating System** - is this a problem with all browsers or only specific ones?
102 | * **Reproduce the Error** - provide a live example (using [Plunker][plunker] or
103 | [JSFiddle][jsfiddle]) or an unambiguous set of steps.
104 | * **Related Issues** - has a similar issue been reported before?
105 | * **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be
106 | causing the problem (line of code or commit)
107 |
108 | Here is a great example of a well defined issue: https://github.com/angular/angular.js/issues/5069
109 |
110 | **If you get help, help others. Good karma rulez!**
111 |
112 | ### Submitting a Pull Request
113 | Before you submit your pull request consider the following guidelines:
114 |
115 | * Search [GitHub][pulls] for an open or closed Pull Request
116 | that relates to your submission. You don't want to duplicate effort.
117 | * Make your changes in a new git branch:
118 |
119 | ```shell
120 | git checkout -b my-fix-branch master
121 | ```
122 |
123 | * Create your patch, **including appropriate test cases**.
124 | * Run the full test suite, `npm test`, and ensure that all tests pass.
125 | * Commit your changes using a descriptive commit message that follows our
126 | [commit message conventions](#commit). Adherence to the [commit message conventions](#commit) is required,
127 | because release notes are automatically generated from these messages.
128 |
129 | ```shell
130 | git commit -a
131 | ```
132 | Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
133 |
134 | * Build your changes locally to ensure all the tests pass:
135 |
136 | ```shell
137 | npm test
138 | ```
139 |
140 | * Push your branch to your fork on GitHub:
141 |
142 | ```shell
143 | git push origin my-fix-branch
144 | ```
145 |
146 | In GitHub, send a pull request to `angular-bootstrap-datetimepicker:develop`.
147 | If we suggest changes, then:
148 |
149 | * Make the required updates.
150 | * Re-run the test suite to ensure tests are still passing.
151 | * Commit your changes to your branch (e.g. `my-fix-branch`).
152 | * Push the changes to your GitHub repository (this will update your Pull Request).
153 |
154 | If the PR gets too outdated we may ask you to rebase and force push to update the PR:
155 |
156 | ```shell
157 | git rebase master -i
158 | git push origin my-fix-branch -f
159 | ```
160 |
161 | _WARNING: Squashing or reverting commits and force-pushing thereafter may remove GitHub comments
162 | on code that were previously made by you or others in your commits. Avoid any form of rebasing
163 | unless necessary._
164 |
165 | That's it! Thank you for your contribution!
166 |
167 | #### After your pull request is merged
168 |
169 | After your pull request is merged, you can safely delete your branch and pull the changes
170 | from the main (upstream) repository:
171 |
172 | * Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
173 |
174 | ```shell
175 | git push origin --delete my-fix-branch
176 | ```
177 |
178 | * Check out the master branch:
179 |
180 | ```shell
181 | git checkout master -f
182 | ```
183 |
184 | * Delete the local branch:
185 |
186 | ```shell
187 | git branch -D my-fix-branch
188 | ```
189 |
190 | * Update your master with the latest upstream version:
191 |
192 | ```shell
193 | git pull --ff upstream master
194 | ```
195 |
196 | ## Coding Rules
197 |
198 | To ensure consistency throughout the source code, keep these rules in mind as you are working:
199 |
200 | * All features or bug fixes **must be tested** by one or more test.
201 |
202 | ## Git Commit Guidelines
203 |
204 | We have very precise rules over how our git commit messages can be formatted. This leads to **more
205 | readable messages** that are easy to follow when looking through the **project history**. But also,
206 | we use the git commit messages to **generate the angular-bootstrap-datetimepicker change log**.
207 |
208 | The commit message formatting can be added using a typical git workflow or through the use of a CLI wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `npm run commit` in your terminal after staging your changes in git.
209 |
210 | ### Commit Message Format
211 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
212 | format that includes a **type**, a **scope** and a **subject**:
213 |
214 | ```
215 | ():
216 |
217 |
218 |
219 |