summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--dist/index.html28
-rw-r--r--src/docs/examples.html14
-rw-r--r--src/docs/footer.html1
-rw-r--r--src/docs/i18n.html11
-rw-r--r--src/docs/intro.html2
6 files changed, 55 insertions, 5 deletions
diff --git a/README.md b/README.md
index 7e9adac..a15ecb7 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,9 @@ Use
I recommend getting the eBook [Handling Time](https://sellfy.com/p/8gxZ) as it has a lot of example code to get started. The quick and dirty:
- To use this plugin you must include jQuery (1.6+) and jQuery UI with datepicker (and optionally slider).
-- Include timepicker-addon script located in the `dist` directory.
+- Include timepicker-addon script and css located in the `dist` directory or from a CDN:
+ * [http://cdnjs.com/libraries/jquery-ui-timepicker-addon](http://cdnjs.com/libraries/jquery-ui-timepicker-addon)
+ * [http://www.jsdelivr.com/#!jquery.ui.timepicker.addon](http://www.jsdelivr.com/#!jquery.ui.timepicker.addon)
- now use timepicker with `$('#selector').datetimepicker()` or `$('#selector').timepicker()`.
There is also a [Bower](http://bower.io/) package named `jqueryui-timepicker-addon`. Beware there are other similar package names that point to forks which may not be current.
diff --git a/dist/index.html b/dist/index.html
index a429ea9..cbee444 100644
--- a/dist/index.html
+++ b/dist/index.html
@@ -112,6 +112,8 @@
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
</pre>
+
+ <p>If you prefer a hosted CDN there are a couple available: <a href="http://cdnjs.com/libraries/jquery-ui-timepicker-addon" title="Timepicker on CDNJS">CDNJS</a>, <a href="http://www.jsdelivr.com/#!jquery.ui.timepicker.addon" title="Timepicker on jsDelivr">jsDelivr</a>.</p>
<br />
<h3>Requirements</h3>
@@ -459,7 +461,8 @@
closeText: 'Закрыть'
});
</pre>
- <p>However, if you plan to use timepicker extensively you will need to include (build your own) localization. It is simply assigning those same variables to an object. As you see in the example below we maintain a separate object for timepicker. This way we aren't bound to any changes within datepicker.</p>
+ <p>However, if you plan to use timepicker extensively you will need to include (build your own) localization. It is simply assigning those same variables to an object.</p>
+ <p>As you see in the example below we maintain a separate object for timepicker. This way we aren't bound to any future changes within datepicker.</p>
<pre>$.datepicker.regional['ru'] = {
closeText: 'Закрыть',
@@ -500,8 +503,14 @@ $.timepicker.regional['ru'] = {
};
$.timepicker.setDefaults($.timepicker.regional['ru']);
</pre>
+
<p>Now all you have to do is call timepicker and the Russian localization is used. Generally you only need to include the localization file, it will setDefaults() for you.</p>
- <p>You can also visit <a href="http://docs.jquery.com/UI/Datepicker/Localization" title="localization for datepicker" target="_BLANK">localization for datepicker</a> for more information about datepicker localizations.</p>
+ <p>As of version 1.4.5 a combined file of all localizations available is included. This file DOES NOT call setDefaults(), so you will need to pass, or merge with your options.</p>
+
+<pre>$('#example123').timepicker($.timepicker.regional['ru']);
+</pre>
+
+ <p>Localization files for datepicker are typically available in your jQueryUI downloads.</p>
</div>
<!-- ############################################################################# -->
@@ -557,6 +566,20 @@ $('#basic_example_3').datetimepicker({
</pre>
</div>
+
+ <!-- ============= example -->
+ <div class="example-container">
+ <p>Timepicker comes with a collection of localization files and one combined file with all available localizations. $.timepicker.regional["your localization code here"] is a simple object with preset options:</p>
+ <div>
+ <input type="text" name="basic_example_4" id="basic_example_4" value="" />
+ </div>
+<pre>
+$('#basic_example_4').timepicker(
+ $.timepicker.regional['es']
+);
+</pre>
+ </div>
+
<h3 id="timezone_examples">Using Timezones</h3>
<!-- ============= example -->
@@ -954,6 +977,7 @@ $('#utility_example_3').text(JSON.stringify(
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
+ <script type="text/javascript" src="i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
<script type="text/javascript">
diff --git a/src/docs/examples.html b/src/docs/examples.html
index 77dd2ef..587b0f1 100644
--- a/src/docs/examples.html
+++ b/src/docs/examples.html
@@ -51,6 +51,20 @@ $('#basic_example_3').datetimepicker({
</pre>
</div>
+
+ <!-- ============= example -->
+ <div class="example-container">
+ <p>Timepicker comes with a collection of localization files and one combined file with all available localizations. $.timepicker.regional["your localization code here"] is a simple object with preset options:</p>
+ <div>
+ <input type="text" name="basic_example_4" id="basic_example_4" value="" />
+ </div>
+<pre>
+$('#basic_example_4').timepicker(
+ $.timepicker.regional['es']
+);
+</pre>
+ </div>
+
<h3 id="timezone_examples">Using Timezones</h3>
<!-- ============= example -->
diff --git a/src/docs/footer.html b/src/docs/footer.html
index 738157d..64cb9f1 100644
--- a/src/docs/footer.html
+++ b/src/docs/footer.html
@@ -7,6 +7,7 @@
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery-ui-timepicker-addon.js"></script>
+ <script type="text/javascript" src="i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script type="text/javascript" src="jquery-ui-sliderAccess.js"></script>
<script type="text/javascript">
diff --git a/src/docs/i18n.html b/src/docs/i18n.html
index 377252a..bd05ccf 100644
--- a/src/docs/i18n.html
+++ b/src/docs/i18n.html
@@ -19,7 +19,8 @@
closeText: 'Закрыть'
});
</pre>
- <p>However, if you plan to use timepicker extensively you will need to include (build your own) localization. It is simply assigning those same variables to an object. As you see in the example below we maintain a separate object for timepicker. This way we aren't bound to any changes within datepicker.</p>
+ <p>However, if you plan to use timepicker extensively you will need to include (build your own) localization. It is simply assigning those same variables to an object.</p>
+ <p>As you see in the example below we maintain a separate object for timepicker. This way we aren't bound to any future changes within datepicker.</p>
<pre>$.datepicker.regional['ru'] = {
closeText: 'Закрыть',
@@ -60,6 +61,12 @@ $.timepicker.regional['ru'] = {
};
$.timepicker.setDefaults($.timepicker.regional['ru']);
</pre>
+
<p>Now all you have to do is call timepicker and the Russian localization is used. Generally you only need to include the localization file, it will setDefaults() for you.</p>
- <p>You can also visit <a href="http://docs.jquery.com/UI/Datepicker/Localization" title="localization for datepicker" target="_BLANK">localization for datepicker</a> for more information about datepicker localizations.</p>
+ <p>As of version 1.4.5 a combined file of all localizations available is included. This file DOES NOT call setDefaults(), so you will need to pass, or merge with your options.</p>
+
+<pre>$('#example123').timepicker($.timepicker.regional['ru']);
+</pre>
+
+ <p>Localization files for datepicker are typically available in your jQueryUI downloads.</p>
</div>
diff --git a/src/docs/intro.html b/src/docs/intro.html
index 8ce20d8..573240d 100644
--- a/src/docs/intro.html
+++ b/src/docs/intro.html
@@ -37,6 +37,8 @@
.ui-timepicker-rtl dl dt{ float: right; clear: right; }
.ui-timepicker-rtl dl dd { margin: 0 45% 10px 10px; }
</pre>
+
+ <p>If you prefer a hosted CDN there are a couple available: <a href="http://cdnjs.com/libraries/jquery-ui-timepicker-addon" title="Timepicker on CDNJS">CDNJS</a>, <a href="http://www.jsdelivr.com/#!jquery.ui.timepicker.addon" title="Timepicker on jsDelivr">jsDelivr</a>.</p>
<br />
<h3>Requirements</h3>