bootstrap-datepicker 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.hgignore +3 -0
- data/.hgtags +9 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +89 -0
- data/CONTRIBUTING.md +40 -0
- data/Gemfile +4 -0
- data/Gruntfile.js +165 -0
- data/LICENSE +202 -0
- data/README.md +24 -0
- data/Rakefile +1 -0
- data/bootstrap-datepicker.gemspec +26 -0
- data/bower.json +9 -0
- data/build/build.less +67 -0
- data/build/build3.less +71 -0
- data/build/build_standalone.less +61 -0
- data/build/build_standalone3.less +63 -0
- data/composer.json +19 -0
- data/css/datepicker.css +509 -0
- data/css/datepicker3.css +790 -0
- data/docs/Makefile +153 -0
- data/docs/REAME.md +8 -0
- data/docs/_static/demo_head.png +0 -0
- data/docs/conf.py +248 -0
- data/docs/events.rst +48 -0
- data/docs/i18n.rst +28 -0
- data/docs/index.rst +122 -0
- data/docs/keyboard.rst +30 -0
- data/docs/make.bat +190 -0
- data/docs/markup.rst +50 -0
- data/docs/methods.rst +156 -0
- data/docs/options.rst +191 -0
- data/js/bootstrap-datepicker.js +1609 -0
- data/js/locales/bootstrap-datepicker.ar.js +15 -0
- data/js/locales/bootstrap-datepicker.bg.js +14 -0
- data/js/locales/bootstrap-datepicker.ca.js +14 -0
- data/js/locales/bootstrap-datepicker.cs.js +15 -0
- data/js/locales/bootstrap-datepicker.cy.js +14 -0
- data/js/locales/bootstrap-datepicker.da.js +15 -0
- data/js/locales/bootstrap-datepicker.de.js +17 -0
- data/js/locales/bootstrap-datepicker.el.js +13 -0
- data/js/locales/bootstrap-datepicker.es.js +14 -0
- data/js/locales/bootstrap-datepicker.et.js +18 -0
- data/js/locales/bootstrap-datepicker.fa.js +17 -0
- data/js/locales/bootstrap-datepicker.fi.js +16 -0
- data/js/locales/bootstrap-datepicker.fr.js +17 -0
- data/js/locales/bootstrap-datepicker.gl.js +11 -0
- data/js/locales/bootstrap-datepicker.he.js +15 -0
- data/js/locales/bootstrap-datepicker.hr.js +13 -0
- data/js/locales/bootstrap-datepicker.hu.js +16 -0
- data/js/locales/bootstrap-datepicker.id.js +15 -0
- data/js/locales/bootstrap-datepicker.is.js +14 -0
- data/js/locales/bootstrap-datepicker.it.js +16 -0
- data/js/locales/bootstrap-datepicker.ja.js +15 -0
- data/js/locales/bootstrap-datepicker.ka.js +17 -0
- data/js/locales/bootstrap-datepicker.kk.js +15 -0
- data/js/locales/bootstrap-datepicker.kr.js +13 -0
- data/js/locales/bootstrap-datepicker.lt.js +16 -0
- data/js/locales/bootstrap-datepicker.lv.js +16 -0
- data/js/locales/bootstrap-datepicker.mk.js +15 -0
- data/js/locales/bootstrap-datepicker.ms.js +14 -0
- data/js/locales/bootstrap-datepicker.nb.js +14 -0
- data/js/locales/bootstrap-datepicker.nl-BE.js +17 -0
- data/js/locales/bootstrap-datepicker.nl.js +14 -0
- data/js/locales/bootstrap-datepicker.no.js +16 -0
- data/js/locales/bootstrap-datepicker.pl.js +15 -0
- data/js/locales/bootstrap-datepicker.pt-BR.js +15 -0
- data/js/locales/bootstrap-datepicker.pt.js +16 -0
- data/js/locales/bootstrap-datepicker.ro.js +15 -0
- data/js/locales/bootstrap-datepicker.rs-latin.js +14 -0
- data/js/locales/bootstrap-datepicker.rs.js +14 -0
- data/js/locales/bootstrap-datepicker.ru.js +15 -0
- data/js/locales/bootstrap-datepicker.sk.js +15 -0
- data/js/locales/bootstrap-datepicker.sl.js +14 -0
- data/js/locales/bootstrap-datepicker.sq.js +15 -0
- data/js/locales/bootstrap-datepicker.sv.js +16 -0
- data/js/locales/bootstrap-datepicker.sw.js +15 -0
- data/js/locales/bootstrap-datepicker.th.js +14 -0
- data/js/locales/bootstrap-datepicker.tr.js +16 -0
- data/js/locales/bootstrap-datepicker.ua.js +15 -0
- data/js/locales/bootstrap-datepicker.uk.js +14 -0
- data/js/locales/bootstrap-datepicker.vi.js +16 -0
- data/js/locales/bootstrap-datepicker.zh-CN.js +16 -0
- data/js/locales/bootstrap-datepicker.zh-TW.js +17 -0
- data/less/datepicker.less +265 -0
- data/less/datepicker3.less +252 -0
- data/lib/bootstrap-datepicker.rb +11 -0
- data/lib/bootstrap-datepicker/version.rb +9 -0
- data/package.json +32 -0
- data/sass/build_standalone-sass.scss +70 -0
- data/sass/datepicker.scss +270 -0
- data/test/Readme.md +9 -0
- data/test/less_test.js +19 -0
- data/test/scss_test.js +19 -0
- data/test/support/less.patch +4 -0
- data/test/support/scss.patch +493 -0
- data/tests/README.md +55 -0
- data/tests/_coverage.html +26 -0
- data/tests/assets/coverage.js +48 -0
- data/tests/assets/jquery-1.7.1.min.js +4 -0
- data/tests/assets/mock.js +26 -0
- data/tests/assets/qunit-logging.js +29 -0
- data/tests/assets/qunit.css +235 -0
- data/tests/assets/qunit.js +1669 -0
- data/tests/assets/utils.js +21 -0
- data/tests/run-qunit.js +157 -0
- data/tests/suites/calendar-weeks.js +48 -0
- data/tests/suites/component.js +202 -0
- data/tests/suites/data-api.js +114 -0
- data/tests/suites/events.js +306 -0
- data/tests/suites/formats.js +235 -0
- data/tests/suites/inline.js +28 -0
- data/tests/suites/keyboard_navigation/2011.js +92 -0
- data/tests/suites/keyboard_navigation/2012.js +468 -0
- data/tests/suites/keyboard_navigation/all.js +26 -0
- data/tests/suites/methods.js +78 -0
- data/tests/suites/mouse_navigation/2011.js +66 -0
- data/tests/suites/mouse_navigation/2012.js +251 -0
- data/tests/suites/mouse_navigation/all.js +33 -0
- data/tests/suites/noconflict.js +20 -0
- data/tests/suites/options.js +648 -0
- data/tests/tests.html +50 -0
- metadata +240 -0
data/docs/i18n.rst
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
I18N
|
2
|
+
====
|
3
|
+
|
4
|
+
The plugin supports i18n for the month and weekday names and the ``weekStart`` option. The default is English ("en"); other available translations are avilable in the ``js/locales/`` directory, simply include your desired locale after the plugin. To add more languages, simply add a key to ``$.fn.datepicker.dates``, before calling ``.datepicker()``. Example::
|
5
|
+
|
6
|
+
$.fn.datepicker.dates['en'] = {
|
7
|
+
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
|
8
|
+
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
9
|
+
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
|
10
|
+
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
11
|
+
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
12
|
+
today: "Today",
|
13
|
+
clear: "Clear"
|
14
|
+
};
|
15
|
+
|
16
|
+
Right-to-left languages may also include ``rtl: true`` to make the calendar display appropriately.
|
17
|
+
|
18
|
+
If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add ``charset="UTF-8"`` to your ``script`` tag:
|
19
|
+
|
20
|
+
.. code-block:: html
|
21
|
+
|
22
|
+
<script type="text/javascript" src="bootstrap-datepicker.XX.js" charset="UTF-8"></script>
|
23
|
+
|
24
|
+
::
|
25
|
+
|
26
|
+
$('.datepicker').datepicker({
|
27
|
+
language: 'XX'
|
28
|
+
});
|
data/docs/index.rst
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
bootstrap-datepicker
|
2
|
+
====================
|
3
|
+
|
4
|
+
Bootstrap-datepicker provides a flexible datepicker widget in the Twitter bootstrap style.
|
5
|
+
|
6
|
+
.. figure:: _static/demo_head.png
|
7
|
+
:align: center
|
8
|
+
|
9
|
+
This is a fork of Stefan Petre's `original code <http://www.eyecon.ro/bootstrap-datepicker/>`_; thanks go to him for getting this thing started!
|
10
|
+
|
11
|
+
Please note that this fork is not used on Stefan's page at this time, nor is it maintained or contributed to by him.
|
12
|
+
|
13
|
+
Versions are incremented according to `semver <http://semver.org/>`_.
|
14
|
+
|
15
|
+
`Online Demo <http://eternicode.github.io/bootstrap-datepicker/>`_
|
16
|
+
|
17
|
+
|
18
|
+
Requirements
|
19
|
+
------------
|
20
|
+
|
21
|
+
* `Bootstrap`_ 2.0.4+
|
22
|
+
* `jQuery`_ 1.7.1+
|
23
|
+
|
24
|
+
.. _Bootstrap: http://twitter.github.com/bootstrap/
|
25
|
+
.. _jQuery: http://jquery.com/
|
26
|
+
|
27
|
+
These are the specific versions bootstrap-datepicker is tested against (``js`` files) and built against (``css`` files). Use other versions at your own risk.
|
28
|
+
|
29
|
+
|
30
|
+
Dependencies
|
31
|
+
------------
|
32
|
+
|
33
|
+
Requires bootstrap's dropdown component (``dropdowns.less``) for some styles, and bootstrap's sprites (``sprites.less`` and associated images) for arrows.
|
34
|
+
|
35
|
+
A standalone .css file (including necessary dropdown styles and alternative, text-based arrows) can be generated by running ``build/build_standalone.less`` through the ``lessc`` compiler::
|
36
|
+
|
37
|
+
$ lessc build/build_standalone.less datepicker.css
|
38
|
+
|
39
|
+
|
40
|
+
Usage
|
41
|
+
-----
|
42
|
+
|
43
|
+
Call the datepicker via javascript::
|
44
|
+
|
45
|
+
$('.datepicker').datepicker()
|
46
|
+
|
47
|
+
|
48
|
+
Data API
|
49
|
+
^^^^^^^^
|
50
|
+
|
51
|
+
As with bootstrap's own plugins, datepicker provides a data-api that can be used to instantiate datepickers without the need for custom javascript. For most datepickers, simply set ``data-provide="datepicker"`` on the element you want to initialize, and it will be intialized lazily, in true bootstrap fashion. For inline datepickers, use ``data-provide="datepicker-inline"``; these will be immediately initialized on page load, and cannot be lazily loaded.
|
52
|
+
|
53
|
+
.. code-block:: html
|
54
|
+
|
55
|
+
<input data-provide="datepicker">
|
56
|
+
|
57
|
+
You can disable datepicker's data-api in the same way as you would disable other bootstrap plugins::
|
58
|
+
|
59
|
+
$(document).off('.datepicker.data-api');
|
60
|
+
|
61
|
+
|
62
|
+
Configuration
|
63
|
+
^^^^^^^^^^^^^
|
64
|
+
|
65
|
+
:doc:`options` are passed to the ``datepicker`` function via an options hash at instantiation::
|
66
|
+
|
67
|
+
$('.datepicker').datepicker({
|
68
|
+
format: 'mm/dd/yyyy',
|
69
|
+
startDate: '-3d'
|
70
|
+
})
|
71
|
+
|
72
|
+
Most options may be provided as data-attributes on the target element:
|
73
|
+
|
74
|
+
.. code-block:: html
|
75
|
+
|
76
|
+
<input class="datepicker" data-date-format="mm/dd/yyyy">
|
77
|
+
|
78
|
+
::
|
79
|
+
|
80
|
+
$('.datepicker').datepicker({
|
81
|
+
startDate: '-3d'
|
82
|
+
})
|
83
|
+
|
84
|
+
Defaults for all options can be modified directly by changing values in the ``$.fn.datepicker.defaults`` hash::
|
85
|
+
|
86
|
+
$.fn.datepicker.defaults.format = "mm/dd/yyyy";
|
87
|
+
$('.datepicker').datepicker({
|
88
|
+
startDate: '-3d'
|
89
|
+
})
|
90
|
+
|
91
|
+
|
92
|
+
No Conflict mode
|
93
|
+
^^^^^^^^^^^^^^^^
|
94
|
+
|
95
|
+
``$.fn.datepicker.noConflict`` provides a way to avoid conflict with other jQuery datepicker plugins::
|
96
|
+
|
97
|
+
var datepicker = $.fn.datepicker.noConflict(); // return $.fn.datepicker to previously assigned value
|
98
|
+
$.fn.bootstrapDP = datepicker; // give $().bootstrapDP the bootstrap-datepicker functionality
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
Table of Contents
|
103
|
+
-----------------
|
104
|
+
|
105
|
+
.. toctree::
|
106
|
+
|
107
|
+
markup
|
108
|
+
options
|
109
|
+
methods
|
110
|
+
events
|
111
|
+
keyboard
|
112
|
+
i18n
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
Indices and tables
|
117
|
+
==================
|
118
|
+
|
119
|
+
* :ref:`genindex`
|
120
|
+
* :ref:`modindex`
|
121
|
+
* :ref:`search`
|
122
|
+
|
data/docs/keyboard.rst
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
Keyboard support
|
2
|
+
================
|
3
|
+
|
4
|
+
The datepicker includes keyboard navigation. The "focused date" is kept track of and highlighted (as with mouse hover) during keyboard nav, and is cleared when a date is toggled or the picker is hidden.
|
5
|
+
|
6
|
+
up, down, left, right arrow keys
|
7
|
+
--------------------------------
|
8
|
+
|
9
|
+
By themselves, left/right will move focus backward/forward one day, up/down will move focus back/forward one week.
|
10
|
+
|
11
|
+
With the shift key, up/left will move focus backward one month, down/right will move focus forward one month.
|
12
|
+
|
13
|
+
With the ctrl key, up/left will move focus backward one year, down/right will move focus forward one year.
|
14
|
+
|
15
|
+
Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year.
|
16
|
+
|
17
|
+
spacebar
|
18
|
+
--------
|
19
|
+
|
20
|
+
Toggles the focused date between selected and unselected. When the date is deselected, the ``clearDate`` event is triggered; otherwise, the ``changeDate`` is triggered.
|
21
|
+
|
22
|
+
escape
|
23
|
+
------
|
24
|
+
|
25
|
+
The escape key can be used to clear the focused date and hide and re-show the datepicker; hiding the picker is necessary if the user wants to manually edit the value.
|
26
|
+
|
27
|
+
enter
|
28
|
+
-----
|
29
|
+
|
30
|
+
When the picker is visible, enter will toggle the focused date (if there is one) and hide the picker. When the picker is not visible, enter will have normal effects -- submitting the current form, etc.
|
data/docs/make.bat
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
@ECHO OFF
|
2
|
+
|
3
|
+
REM Command file for Sphinx documentation
|
4
|
+
|
5
|
+
if "%SPHINXBUILD%" == "" (
|
6
|
+
set SPHINXBUILD=sphinx-build
|
7
|
+
)
|
8
|
+
set BUILDDIR=_build
|
9
|
+
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
10
|
+
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
11
|
+
if NOT "%PAPER%" == "" (
|
12
|
+
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
13
|
+
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
14
|
+
)
|
15
|
+
|
16
|
+
if "%1" == "" goto help
|
17
|
+
|
18
|
+
if "%1" == "help" (
|
19
|
+
:help
|
20
|
+
echo.Please use `make ^<target^>` where ^<target^> is one of
|
21
|
+
echo. html to make standalone HTML files
|
22
|
+
echo. dirhtml to make HTML files named index.html in directories
|
23
|
+
echo. singlehtml to make a single large HTML file
|
24
|
+
echo. pickle to make pickle files
|
25
|
+
echo. json to make JSON files
|
26
|
+
echo. htmlhelp to make HTML files and a HTML help project
|
27
|
+
echo. qthelp to make HTML files and a qthelp project
|
28
|
+
echo. devhelp to make HTML files and a Devhelp project
|
29
|
+
echo. epub to make an epub
|
30
|
+
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
31
|
+
echo. text to make text files
|
32
|
+
echo. man to make manual pages
|
33
|
+
echo. texinfo to make Texinfo files
|
34
|
+
echo. gettext to make PO message catalogs
|
35
|
+
echo. changes to make an overview over all changed/added/deprecated items
|
36
|
+
echo. linkcheck to check all external links for integrity
|
37
|
+
echo. doctest to run all doctests embedded in the documentation if enabled
|
38
|
+
goto end
|
39
|
+
)
|
40
|
+
|
41
|
+
if "%1" == "clean" (
|
42
|
+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
43
|
+
del /q /s %BUILDDIR%\*
|
44
|
+
goto end
|
45
|
+
)
|
46
|
+
|
47
|
+
if "%1" == "html" (
|
48
|
+
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
49
|
+
if errorlevel 1 exit /b 1
|
50
|
+
echo.
|
51
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
52
|
+
goto end
|
53
|
+
)
|
54
|
+
|
55
|
+
if "%1" == "dirhtml" (
|
56
|
+
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
57
|
+
if errorlevel 1 exit /b 1
|
58
|
+
echo.
|
59
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
60
|
+
goto end
|
61
|
+
)
|
62
|
+
|
63
|
+
if "%1" == "singlehtml" (
|
64
|
+
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
65
|
+
if errorlevel 1 exit /b 1
|
66
|
+
echo.
|
67
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
68
|
+
goto end
|
69
|
+
)
|
70
|
+
|
71
|
+
if "%1" == "pickle" (
|
72
|
+
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
73
|
+
if errorlevel 1 exit /b 1
|
74
|
+
echo.
|
75
|
+
echo.Build finished; now you can process the pickle files.
|
76
|
+
goto end
|
77
|
+
)
|
78
|
+
|
79
|
+
if "%1" == "json" (
|
80
|
+
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
81
|
+
if errorlevel 1 exit /b 1
|
82
|
+
echo.
|
83
|
+
echo.Build finished; now you can process the JSON files.
|
84
|
+
goto end
|
85
|
+
)
|
86
|
+
|
87
|
+
if "%1" == "htmlhelp" (
|
88
|
+
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
89
|
+
if errorlevel 1 exit /b 1
|
90
|
+
echo.
|
91
|
+
echo.Build finished; now you can run HTML Help Workshop with the ^
|
92
|
+
.hhp project file in %BUILDDIR%/htmlhelp.
|
93
|
+
goto end
|
94
|
+
)
|
95
|
+
|
96
|
+
if "%1" == "qthelp" (
|
97
|
+
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
98
|
+
if errorlevel 1 exit /b 1
|
99
|
+
echo.
|
100
|
+
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
101
|
+
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
102
|
+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\bootstrap-datepicker.qhcp
|
103
|
+
echo.To view the help file:
|
104
|
+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\bootstrap-datepicker.ghc
|
105
|
+
goto end
|
106
|
+
)
|
107
|
+
|
108
|
+
if "%1" == "devhelp" (
|
109
|
+
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
110
|
+
if errorlevel 1 exit /b 1
|
111
|
+
echo.
|
112
|
+
echo.Build finished.
|
113
|
+
goto end
|
114
|
+
)
|
115
|
+
|
116
|
+
if "%1" == "epub" (
|
117
|
+
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
118
|
+
if errorlevel 1 exit /b 1
|
119
|
+
echo.
|
120
|
+
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
121
|
+
goto end
|
122
|
+
)
|
123
|
+
|
124
|
+
if "%1" == "latex" (
|
125
|
+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
126
|
+
if errorlevel 1 exit /b 1
|
127
|
+
echo.
|
128
|
+
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
129
|
+
goto end
|
130
|
+
)
|
131
|
+
|
132
|
+
if "%1" == "text" (
|
133
|
+
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
134
|
+
if errorlevel 1 exit /b 1
|
135
|
+
echo.
|
136
|
+
echo.Build finished. The text files are in %BUILDDIR%/text.
|
137
|
+
goto end
|
138
|
+
)
|
139
|
+
|
140
|
+
if "%1" == "man" (
|
141
|
+
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
142
|
+
if errorlevel 1 exit /b 1
|
143
|
+
echo.
|
144
|
+
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
145
|
+
goto end
|
146
|
+
)
|
147
|
+
|
148
|
+
if "%1" == "texinfo" (
|
149
|
+
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
150
|
+
if errorlevel 1 exit /b 1
|
151
|
+
echo.
|
152
|
+
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
153
|
+
goto end
|
154
|
+
)
|
155
|
+
|
156
|
+
if "%1" == "gettext" (
|
157
|
+
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
158
|
+
if errorlevel 1 exit /b 1
|
159
|
+
echo.
|
160
|
+
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
161
|
+
goto end
|
162
|
+
)
|
163
|
+
|
164
|
+
if "%1" == "changes" (
|
165
|
+
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
166
|
+
if errorlevel 1 exit /b 1
|
167
|
+
echo.
|
168
|
+
echo.The overview file is in %BUILDDIR%/changes.
|
169
|
+
goto end
|
170
|
+
)
|
171
|
+
|
172
|
+
if "%1" == "linkcheck" (
|
173
|
+
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
174
|
+
if errorlevel 1 exit /b 1
|
175
|
+
echo.
|
176
|
+
echo.Link check complete; look for any errors in the above output ^
|
177
|
+
or in %BUILDDIR%/linkcheck/output.txt.
|
178
|
+
goto end
|
179
|
+
)
|
180
|
+
|
181
|
+
if "%1" == "doctest" (
|
182
|
+
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
183
|
+
if errorlevel 1 exit /b 1
|
184
|
+
echo.
|
185
|
+
echo.Testing of doctests in the sources finished, look at the ^
|
186
|
+
results in %BUILDDIR%/doctest/output.txt.
|
187
|
+
goto end
|
188
|
+
)
|
189
|
+
|
190
|
+
:end
|
data/docs/markup.rst
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
Markup
|
2
|
+
=======
|
3
|
+
|
4
|
+
The following are examples of supported markup. On their own, these will not provide a datepicker widget; you will need to instantiate the datepicker on the markup.
|
5
|
+
|
6
|
+
|
7
|
+
input
|
8
|
+
-----
|
9
|
+
|
10
|
+
The simplest case: focusing the input (clicking or tabbing into it) will show the picker.
|
11
|
+
|
12
|
+
.. code-block:: html
|
13
|
+
|
14
|
+
<input value="02-16-2012">
|
15
|
+
|
16
|
+
component
|
17
|
+
---------
|
18
|
+
|
19
|
+
Adding the ``date`` class to an ``input-append`` or ``input-prepend`` bootstrap component will allow the ``add-on`` elements to trigger the picker.
|
20
|
+
|
21
|
+
.. code-block:: html
|
22
|
+
|
23
|
+
<div class="input-append date">
|
24
|
+
<input value="12-02-2012">
|
25
|
+
<span class="add-on"><i class="icon-th"></i></span>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
|
29
|
+
date-range
|
30
|
+
----------
|
31
|
+
|
32
|
+
Using the ``input-daterange`` construct with multiple child inputs will instantiate one picker per input and link them together to allow selecting ranges.
|
33
|
+
|
34
|
+
.. code-block:: html
|
35
|
+
|
36
|
+
<div class="input-daterange">
|
37
|
+
<input value="2012-04-05" />
|
38
|
+
<span class="add-on">to</span>
|
39
|
+
<input value="2012-04-07" />
|
40
|
+
</div>
|
41
|
+
|
42
|
+
|
43
|
+
inline or embedded
|
44
|
+
------------------
|
45
|
+
|
46
|
+
Instantiating the datepicker on a simple div will give an embedded picker that is always visible.
|
47
|
+
|
48
|
+
.. code-block:: html
|
49
|
+
|
50
|
+
<div></div>
|
data/docs/methods.rst
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
Methods
|
2
|
+
=======
|
3
|
+
|
4
|
+
Methods are called on a datepicker by call the ``datepicker`` function with a string first argument, followed by any arguments the method takes::
|
5
|
+
|
6
|
+
$('.datepicker').datepicker('method', arg1, arg2);
|
7
|
+
|
8
|
+
|
9
|
+
remove
|
10
|
+
------
|
11
|
+
|
12
|
+
Arguments: None
|
13
|
+
|
14
|
+
Remove the datepicker. Removes attached events, internal attached objects, and added HTML elements.
|
15
|
+
|
16
|
+
|
17
|
+
show
|
18
|
+
----
|
19
|
+
|
20
|
+
Arguments: None
|
21
|
+
|
22
|
+
Show the picker.
|
23
|
+
|
24
|
+
|
25
|
+
hide
|
26
|
+
----
|
27
|
+
|
28
|
+
Arguments: None
|
29
|
+
|
30
|
+
Hide the picker.
|
31
|
+
|
32
|
+
|
33
|
+
update
|
34
|
+
------
|
35
|
+
|
36
|
+
Arguments:
|
37
|
+
|
38
|
+
* date (String|Date, optional)
|
39
|
+
|
40
|
+
Update the datepicker with given argument or the current input value.
|
41
|
+
|
42
|
+
If ``date`` is provided and is a Date object, it is assumed to be a "local" date object, and will be converted to UTC for internal use.
|
43
|
+
|
44
|
+
::
|
45
|
+
|
46
|
+
$('.datepicker').datepicker('update');
|
47
|
+
$('.datepicker').datepicker('update', '2011-03-05');
|
48
|
+
$('.datepicker').datepicker('update', new Date(2011, 2, 5));
|
49
|
+
|
50
|
+
|
51
|
+
setDate
|
52
|
+
-------
|
53
|
+
|
54
|
+
Arguments:
|
55
|
+
|
56
|
+
* date (Date)
|
57
|
+
|
58
|
+
Sets the internal date. ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use.
|
59
|
+
|
60
|
+
|
61
|
+
setUTCDate
|
62
|
+
----------
|
63
|
+
|
64
|
+
Arguments:
|
65
|
+
|
66
|
+
* date (Date)
|
67
|
+
|
68
|
+
Sets the internal date. ``date`` is assumed to be a UTC date object, and will not be converted.
|
69
|
+
|
70
|
+
|
71
|
+
setDates
|
72
|
+
--------
|
73
|
+
|
74
|
+
Arguments:
|
75
|
+
|
76
|
+
* date[, date[, ...]] (Date)
|
77
|
+
|
78
|
+
Sets the internal date list. Each ``date`` is assumed to be a "local" date object, and will be converted to UTC for internal use. For use with multidate pickers.
|
79
|
+
|
80
|
+
|
81
|
+
setUTCDates
|
82
|
+
-----------
|
83
|
+
|
84
|
+
Arguments:
|
85
|
+
|
86
|
+
* date[, date[, ...]] (Date)
|
87
|
+
|
88
|
+
Sets the internal date list. Each ``date`` is assumed to be a UTC date object, and will not be converted. For use with multidate pickers.
|
89
|
+
|
90
|
+
|
91
|
+
getDate
|
92
|
+
-------
|
93
|
+
|
94
|
+
Arguments: None
|
95
|
+
|
96
|
+
Returns a localized date object representing the internal date object of the first datepicker in the selection. For multidate pickers, returns the latest date selected.
|
97
|
+
|
98
|
+
|
99
|
+
getUTCDate
|
100
|
+
----------
|
101
|
+
|
102
|
+
Arguments: None
|
103
|
+
|
104
|
+
Returns the internal UTC date object, as-is and unconverted to local time, of the first datepicker in the selection. For multidate pickers, returns the latest date selected.
|
105
|
+
|
106
|
+
|
107
|
+
getDates
|
108
|
+
--------
|
109
|
+
|
110
|
+
Arguments: None
|
111
|
+
|
112
|
+
Returns a list of localized date objects representing the internal date objects of the first datepicker in the selection. For use with multidate pickers.
|
113
|
+
|
114
|
+
|
115
|
+
getUTCDates
|
116
|
+
-----------
|
117
|
+
|
118
|
+
Arguments: None
|
119
|
+
|
120
|
+
Returns the internal list of UTC date objects, as they are and unconverted to local time, of the first datepicker in the selection. For use with multidate pickers.
|
121
|
+
|
122
|
+
|
123
|
+
setStartDate
|
124
|
+
------------
|
125
|
+
|
126
|
+
Arguments:
|
127
|
+
|
128
|
+
* startDate (Date)
|
129
|
+
|
130
|
+
Sets a new lower date limit on the datepicker. See :ref:`startdate` for valid values.
|
131
|
+
|
132
|
+
Omit startDate (or provide an otherwise falsey value) to unset the limit.
|
133
|
+
|
134
|
+
|
135
|
+
setEndDate
|
136
|
+
----------
|
137
|
+
|
138
|
+
Arguments:
|
139
|
+
|
140
|
+
* endDate (Date)
|
141
|
+
|
142
|
+
Sets a new upper date limit on the datepicker. See :ref:`enddate` for valid values.
|
143
|
+
|
144
|
+
Omit endDate (or provide an otherwise falsey value) to unset the limit.
|
145
|
+
|
146
|
+
|
147
|
+
setDaysOfWeekDisabled
|
148
|
+
---------------------
|
149
|
+
|
150
|
+
Arguments:
|
151
|
+
|
152
|
+
* daysOfWeekDisabled (String|Array)
|
153
|
+
|
154
|
+
Sets the days of week that should be disabled. See :ref:`daysofweekdisabled` for valid values.
|
155
|
+
|
156
|
+
Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days.
|