Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Commit 768b812

Browse files
Amit KumarAmit Kumar
authored andcommitted
initial commit
0 parents  commit 768b812

34 files changed

+1545
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
node_modules/
3+
typings

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 KekeH
4+
Copyright (c) 2016 ForNeVeR
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 all
14+
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 THE
22+
SOFTWARE.

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# mydatepicker v. 0.0.12
2+
3+
**Angular 2 date picker - Angular2 reusable UI component**
4+
5+
## Description
6+
Simple Angular2 date picker.
7+
8+
![alt text](https://github.com/kekeh/mydatepicker/blob/master/image/mydatepicker-normal-image.png "mydatepicker normal mode")
9+
10+
Image 1. _mydatepicker in normal mode._
11+
12+
![alt text](https://github.com/kekeh/mydatepicker/blob/master/image/mydatepicker-inline-image.png "mydatepicker inline mode")
13+
14+
Image 2. _mydatepicker in inline mode._
15+
16+
##Getting Started
17+
1. Fork and clone this repo
18+
2. npm install
19+
3. Open a terminal and type "npm start"
20+
4. Open "http://localhost:5000" to browser
21+
22+
## Installation
23+
24+
To install this component to an external project, follow the procedure:
25+
26+
1. Make sure you're using Webpack and have installed `raw-loader`, `postcss-loader` and `sass-loader`.
27+
2. `npm install kekeh/mydatepicker`.
28+
3. `import {MyDatePicker} from 'MyDatePicker/src/index';`
29+
4. Use the following snippet inside your template:
30+
31+
```html
32+
<my-date-picker [options]="myDatePickerOptions"
33+
(dateChanged)="onDateChanged($event)"
34+
[selDate]="selectedDate"></my-date-picker>
35+
```
36+
37+
## Usage
38+
39+
All input properties are optional.
40+
41+
### options
42+
Bind to an object containing replacements for any of the following defaults:
43+
44+
#### dayLabels
45+
`{su: 'Sun', mo: 'Mon', tu: 'Tue', we: 'Wed', th: 'Thu', fr: 'Fri', sa: 'Sat'}`
46+
47+
#### monthLabels
48+
`{ 1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' }`
49+
50+
#### dateFormat
51+
`'yyyy-mm-dd'`
52+
53+
#### todayBtnTxt
54+
`'Today'`
55+
56+
#### firstDayOfWeek
57+
`'mo'`
58+
59+
#### sunHighlight
60+
`true`
61+
62+
#### disableUntil
63+
`{year: 2016, month: 6, day: 26}`
64+
65+
#### disableSince
66+
`{year: 2016, month: 7, day: 22}`
67+
68+
#### disableWeekends
69+
`false`
70+
71+
#### inline
72+
`false`
73+
74+
#### height
75+
`'34px'`
76+
77+
#### width
78+
`'100%'`
79+
80+
### locale
81+
A two-letter ISO 639-1 language code can be provided as shorthand for several of
82+
the options listed above. Currently supported languages: ja.
83+
84+
### selDate
85+
Provide the initially chosen date that will display both in the text input field
86+
and provide the default for the popped-up datepicker.
87+
88+
### defaultMonth
89+
If `selDate` is not specified, when the datepicker is opened, it will
90+
ordinarily default to selecting the current date. If you would prefer
91+
a different year and month to be the default for a freshly chosen date
92+
picking operation, specify a `[defaultMonth]` in the same format as
93+
that for the datepicker options (`yyyy.mm` if not otherwise specified).
94+
95+
## Demo
96+
Online demo is [here](http://kekeh.github.io/mydatepicker)
97+
98+
## Compatibility (tested with)
99+
* Firefox (latest)
100+
* Chromium (latest)
101+
* Edge
102+
* IE11
103+
104+
## License
105+
* License: MIT
106+
107+
## Author
108+
* Author: kekeh

image/mydatepicker-inline-image.png

16.1 KB
Loading

image/mydatepicker-normal-image.png

19 KB
Loading

package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "angular2-datepicker",
3+
"version": "1.0.0",
4+
"description": "Angular2 date picker",
5+
"keywords": [
6+
"Angular2",
7+
"date picker"
8+
],
9+
"author": "Amit Mittal",
10+
"license": "MIT",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/Akmittal/mydatepicker.git"
14+
},
15+
"engines": {
16+
"node": ">=5.4"
17+
},
18+
"scripts": {
19+
"start": "./node_modules/.bin/webpack-dev-server --config webpack.js --progress",
20+
"postinstall": "./node_modules/.bin/typings install"
21+
},
22+
"dependencies": {
23+
"@angular/common": "^2.0.0-rc.4",
24+
"@angular/compiler": "^2.0.0-rc.4",
25+
"@angular/core": "^2.0.0-rc.4",
26+
"@angular/platform-browser": "^2.0.0-rc.4",
27+
"@angular/platform-browser-dynamic": "^2.0.0-rc.4",
28+
"es6-shim": "~0.35.1",
29+
"reflect-metadata": "0.1.3",
30+
"rxjs": "5.0.0-beta.9",
31+
"zone.js": "~0.6.12"
32+
},
33+
"devDependencies": {
34+
"css-loader": "~0.23.1",
35+
"extract-text-webpack-plugin": "~1.0.1",
36+
"html-webpack-plugin": "~2.16.1",
37+
"node-sass": "~3.7.0",
38+
"postcss-loader": "~0.9.1",
39+
"raw-loader": "~0.5.1",
40+
"sass-loader": "~3.2.0",
41+
"style-loader": "~0.13.1",
42+
"ts-loader": "~0.8.2",
43+
"typescript": "~1.8.10",
44+
"typings": "~0.8.1",
45+
"webpack": "~1.13.0",
46+
"webpack-dev-server": "^1.14.1",
47+
"webpack-livereload-plugin": "~0.8.1"
48+
}
49+
}

src/app/interfaces.js

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/interfaces.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)