Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added close button to pickadate - this closes the modal without affecting the currently selected date #478

Merged
merged 3 commits into from
Jul 12, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
node_modules/*

*.log

.idea
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ There are currently two pickers: **date** and **time**.

File | Contents | Size (min & gzip)
----------------------- | ------------------------ | ----------------------
`picker.js` | __Base *__ | 1.75kb
`picker.js` | __Base *__ | 1.76kb
`picker.date.js` | Date picker | 2.65kb
`picker.time.js` | Time picker | 1.86kb
`picker.time.js` | Time picker | 1.85kb

__*__ The base script is **required** for any of the pickers to function.

Expand All @@ -52,10 +52,10 @@ All themes are [generated using LESS](#less-styling) and compiled from the `lib/
File | Contents | Size (min & gzip)
----------------------- | ---------------------------- | ----------------------
`default.css` | __Base default *__ | 0.49kb
`default.date.css` | Default date picker | 0.72kb
`default.date.css` | Default date picker | 0.74kb
`default.time.css` | Default time picker | 0.35kb
`classic.css` | __Base classic *__ | 0.39kb
`classic.date.css` | Classic date picker | 0.72kb
`classic.date.css` | Classic date picker | 0.74kb
`classic.time.css` | Classic time picker | 0.35kb
`rtl.css` | __RTL language stylings **__ | 0.10kb

Expand Down
30 changes: 15 additions & 15 deletions api.htm
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,16 @@ <h3 class="heading heading--divide"><span class="heading__text"><b>*</b> Item Ob
month: 3,

// The date of the month.
date: 20,
date: 19,

// The day of the week with zero-as-index.
day: 6,
day: 5,

// The underlying JavaScript Date object.
obj: { 'Sat, 20 Apr 2013 04:00:00 GMT' },
obj: { 'Fri, 19 Apr 2013 23:00:00 GMT' },

// The “pick” value used for comparisons.
pick: 1366430400000
pick: 1366412400000
}</code></pre>

<p>Here’s a <b>time picker item object</b> for <u>4:20 PM</u>:</p>
Expand Down Expand Up @@ -556,13 +556,13 @@ <h2 class="heading heading--divide"><span class="heading__text">Set <code class=
<h3 class="heading heading--divide"><span class="heading__text">Select a date <a href="#item-objects">item object</a><a class="heading__anchor--bigger" name="method-set-select-date" href="#method-set-select-date">&sect;</a></span></h3>

<pre class="pre--demo"><code data-language="javascript">// Using arrays formatted as [YEAR,MONTH,DATE].
picker.set('select', [2013,3,20])
picker.set('select', [2013,3,19])

// Using JavaScript Date objects.
picker.set('select', new Date(2013, 3, 30))
picker.set('select', new Date(2013, 3, 28))

// Using positive integers as UNIX timestamps.
picker.set('select', 1366898887654)
picker.set('select', 1366880887654)

// Using a string along with the parsing format (defaults to <a href="date.htm#formats">`format` option</a>).
picker.set('select', '2014-04-20', { format: 'yyyy-mm-dd' })</code></pre>
Expand All @@ -575,7 +575,7 @@ <h3 class="heading heading--divide"><span class="heading__text">Select a time <a
picker.set('select', [3,0])

// Using JavaScript Date objects.
picker.set('select', new Date(2013, 3, 20, 10, 30))
picker.set('select', new Date(2013, 3, 19, 10, 30))

// Using positive integers as minutes.
picker.set('select', 540)
Expand All @@ -600,13 +600,13 @@ <h2 class="heading heading--divide"><span class="heading__text">Set <code class=
<h3 class="heading heading--divide"><span class="heading__text">Highlight a date <a href="#item-objects">item object</a><a class="heading__anchor--bigger" name="method-set-highlight-date" href="#method-set-highlight-date">&sect;</a></span></h3>

<pre class="pre--demo"><code data-language="javascript">// Using arrays formatted as [YEAR,MONTH,DATE].
picker.set('highlight', [2013,3,20])
picker.set('highlight', [2013,3,19])

// Using JavaScript Date objects.
picker.set('highlight', new Date(2013, 3, 30))
picker.set('highlight', new Date(2013, 3, 28))

// Using positive integers as UNIX timestamps.
picker.set('highlight', 1366898887654)
picker.set('highlight', 1366880887654)

// Using a string along with the parsing format (defaults to <a href="date.htm#formats">`format` option</a>).
picker.set('highlight', '2014-04-20', { format: 'yyyy-mm-dd' })</code></pre>
Expand All @@ -619,7 +619,7 @@ <h3 class="heading heading--divide"><span class="heading__text">Highlight a time
picker.set('highlight', [15,30])

// Using JavaScript Date objects.
picker.set('highlight', new Date(2013, 3, 20, 10, 30))
picker.set('highlight', new Date(2013, 3, 19, 10, 30))

// Using positive integers as minutes.
picker.set('highlight', 1080)
Expand Down Expand Up @@ -665,7 +665,7 @@ <h3 class="heading heading--divide"><span class="heading__text">Viewset a time <
picker.set('view', [15,30])

// Using JavaScript Date objects.
picker.set('view', new Date(2013, 3, 20, 10, 30))
picker.set('view', new Date(2013, 3, 19, 10, 30))

// Using positive integers as minutes.
picker.set('view', 1080)
Expand Down Expand Up @@ -712,7 +712,7 @@ <h3 class="heading heading--divide"><span class="heading__text">Limit the min ti
picker.set('min', [15,30])

// Using JavaScript Date objects.
picker.set('min', new Date(2013, 3, 20, 10, 30))
picker.set('min', new Date(2013, 3, 19, 10, 30))

// Using integers as intervals relative from now.
picker.set('min', -4)
Expand Down Expand Up @@ -762,7 +762,7 @@ <h3 class="heading heading--divide"><span class="heading__text">Limit the max ti
picker.set('max', [15,30])

// Using JavaScript Date objects.
picker.set('max', new Date(2013, 3, 20, 10, 30))
picker.set('max', new Date(2013, 3, 19, 10, 30))

// Using integers as intervals relative from now.
picker.set('max', 4)
Expand Down
20 changes: 0 additions & 20 deletions demo/scripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1144,26 +1144,6 @@ $( '#button__api-set--enable-time-all' ).on( 'click', function( event ) {
event.stopPropagation()
})

//enable/disable: range
var $input_set__enable_disable_in_range_date = $( '#demo__api-set--enable-disable-in-range-date' ).pickadate({
disable: [
1, [2013, 10, 17, 'inverted'],
{ from: [2014, 2, 2], to: [2014, 2, 28] },
[2014, 2, 10, 'inverted'],
{ from: [2014, 2, 14], to: [2014, 2, 23], inverted: true }
]
}),
picker_set__enable_disable_in_range_date = $input_set__enable_disable_in_range_date.pickadate( 'picker' )
var $input_set__enable_disable_in_range_time = $( '#demo__api-set--enable-disable-in-range-time' ).pickatime({
disable: [
1, [1, 30, 'inverted'],
{ from: [3,0], to: [18,0] },
[4, 30, 'inverted'],
{ from: [7,30], to: [11,30], inverted: true }
]
}),
picker_set__enable_disable_in_range_time = $input_set__enable_disable_in_range_time.pickatime( 'picker' )

//interval: time
var $input_set__interval_time = $( '#demo__api-set--interval' ).pickatime(),
picker_set__interval_time = $input_set__interval_time.pickatime( 'picker' )
Expand Down
2 changes: 1 addition & 1 deletion lib/compressed/picker.date.js

Large diffs are not rendered by default.

Loading