Skip to content

Commit 813c0f8

Browse files
committed
maint(pat-date-picker): Remove obsolete library comparison section from docs and fix Markdown headers.
1 parent 1ed7e9a commit 813c0f8

File tree

1 file changed

+9
-35
lines changed

1 file changed

+9
-35
lines changed

src/pat/date-picker/documentation.md

Lines changed: 9 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,36 @@ for browsers which don't yet support the HTML5 date input.
99

1010
### Examples
1111

12-
####Falling back to the browser's HTML5 picker if available.
12+
#### Falling back to the browser's HTML5 picker if available.
1313

1414
Set the `behavior` option to `native` to use the browser's HTML5 date input
1515
rendering when available.
1616

1717
<input class="pat-date-picker" type="date" data-pat-date-picker="behavior: native">
1818

19-
####Enforcing the styled non-HTML5 picker universally.
19+
#### Enforcing the styled non-HTML5 picker universally.
2020

2121
By default this pattern will NOT defer to the browser's HTML5 picker.
2222

2323
<input class="pat-date-picker" type="date">
2424

25-
####Default value
25+
#### Default value
2626

2727
<input class="pat-date-picker" type="date" value="2015-01-01">
2828

29-
####First day on Monday
29+
#### First day on Monday
3030

3131
<input class="pat-date-picker" type="date" value="2015-01-01" data-pat-date-picker="first-day: 1">
3232

33-
####Specifying the "min" and "max" attributes.
33+
#### Specifying the "min" and "max" attributes.
3434

3535
<input class="pat-date-picker" min="2015-01-01" max="2015-12-31" type="date">
3636

37-
####Show the week number.
37+
#### Show the week number.
3838

3939
<input class="pat-date-picker" data-pat-date-picker="week-numbers: show;" type="date">
4040

41-
####Multilingual support with German translations
41+
#### Multilingual support with German translations
4242

4343
The picker's UI can be translated by providing a URL to the `i18n` option. This
4444
URL must point to a JSON encoded resource containing the translations.
@@ -55,15 +55,15 @@ Here are all the i18n values in JSON format:
5555
"weekdaysShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
5656
}
5757

58-
####Automatically update one date when changing another
58+
#### Automatically update one date when changing another
5959

6060
You can define one date input to be after another date with the ``after`` option.
6161
The the other date is changed after the first, it will be automatically updated to be offset days after the first.
6262

6363
<input name="start" class="pat-date-picker" type="date"/>
6464
<input name="end" class="pat-date-picker" type="date" data-pat-date-picker="after: input[name=start]; offset-days: 2;"/>
6565

66-
####Format the displayed date
66+
#### Format the displayed date
6767

6868
In the default ``styled`` behavior mode, you can format the displayed date.
6969
The date input will be hidden and updated with an ISO8601 date to submit values which are machine-readable.
@@ -73,32 +73,6 @@ The locale option allows you to define the language in which the formatted date
7373
<input class="pat-date-picker" data-pat-date-picker="output-format: Do MMMM YYYY; locale: de" type="date" />
7474

7575

76-
### Why did we base this library on Pikaday?
77-
78-
When looking for the underlying library to use for this pattern, we compared
79-
pikaday and [pickadate](https://dbushell.github.io/Pikaday/).
80-
81-
- Prefixed CSS classes
82-
83-
Pikaday's CSS classes are prefixed to make them unique, whereas Pickadate's
84-
classes are very generic and therefore prone to clash with existing classes and CSS in certain sites.
85-
86-
- Better markup
87-
88-
One of the main drawbacks of pickadate is the markup that it produces.
89-
Pickaday's special markup is inserted relative to the input element being overridden.
90-
91-
In contrast, the markup generated by pikaday is appended to the end of the
92-
`<body>` tag, and it then uses absolute positioning to position the picker.
93-
94-
This is easier to style and less prone to create problems when integrating the
95-
picker in diverse styling environments.
96-
97-
- Simpler, more modest featureset and Javascript
98-
99-
Pikaday is only 5KB compressed. The code is AMD aware and easy to read and
100-
understand.
101-
10276
### Option reference
10377

10478
The HTML5 attributes `min` and `max` will be honoured.

0 commit comments

Comments
 (0)