Skip to content

Commit 9276631

Browse files
Update datepicker.md
Just some legibility tweaks.
1 parent edec694 commit 9276631

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/datepicker.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
11
Date Picker Addon
22
=================
33

4-
Everyone loves a nice date picker, and now you can have your very own date picker
5-
in Schema Form! The date picker addon uses the excellent jQuery based date
6-
picker [pickadate.js](http://amsul.ca/pickadate.js/).
4+
Everyone loves a nice date picker - now you can have your very own date picker in Schema Form! The date picker add-on uses the excellent jQuery-based date picker, [pickadate.js](http://amsul.ca/pickadate.js/).
75

8-
Note that dates in JSON Schema has the type *"string"* and follow the *RFC 3339*
9-
date fomat which in turn follows *ISO 8601*. So what does that really mean? Stick
10-
with the format ```yyyy-mm-dd``` and you'll be fine. The date picker only
11-
supports date, not time.
6+
Dates in JSON Schema are of type *"string"* and follow the *RFC 3339* date fomat, which, in turn, follows *ISO 8601*. What does that mean for you? Basically, just stick with the format `yyyy-mm-dd` and you'll be fine.
7+
8+
Within Schema Form, pickadate only supports dates - not times.
129

1310
Installation
1411
------------
15-
The date picker is an addon to the bootstrap decorator. To use it you just
16-
include ```dist/bootstrap-datepicker.min.js``` *after*
17-
```dist/bootstrap-decorator.min.js```
18-
19-
You'll also need the files neccessary for pickadate, see the pickadate.js
20-
[github page](https://github.com/amsul/pickadate.js) or documentation.
21-
22-
Note that it depends on jQuery and that you also need CSS and translation files
23-
for the language you like to use.
12+
The date picker is an add-on to the Bootstrap decorator. To use it, just include `dist/bootstrap-datepicker.min.js` *after* `dist/bootstrap-decorator.min.js`.
2413

14+
You'll need to load a few additional files to use pickadate:
2515

16+
1. jQuery (pickadate depends on it)
17+
2. The pickadate source files (see the pickadate.js [GitHub page](https://github.com/amsul/pickadate.js) for documentation)
18+
3. The pickadate CSS
19+
4. Translation files for whatever language you want to use
2620

2721
Usage
2822
-----
29-
The datepicker addon adds a new form type ```datepicker``` and a new default
23+
The datepicker add-on adds a new form type, `datepicker`, and a new default
3024
mapping.
3125

3226
| Form Type | Becomes |
3327
|:---------------|:------------:|
34-
| datepicker | a pick a date widget |
28+
| datepicker | a pickadate widget |
3529

3630

37-
| Schema | Form type |
31+
| Schema | Default Form type |
3832
|:-------------------|:------------:|
3933
| "type": "string" and "format": "date" | datepicker |
4034

4135

42-
Options
36+
Form Type Options
4337
-------
38+
The `datepicker` form type takes two options: `minDate` and `maxDate`. `minDate` and `maxDate` both accept one of the following as values:
39+
40+
1. A string in the format `yyyy-mm-dd`,
41+
2. A unix timestamp (as a Number), or
42+
3. An instance of `Date`
43+
44+
Here's an example:
45+
4446
```javascript
4547
{
4648
key: "birthDate",
@@ -49,6 +51,4 @@ Options
4951
}
5052
```
5153

52-
The ```datepicker``` takes two options, a max and min date. Both take either
53-
a string in the format ```yyyy-mm-dd```, a unix timestamp (as a Number) or a
54-
```Date``` instance.
54+

0 commit comments

Comments
 (0)