snipt

Ctrl+h for KB shortcuts

JavaScript

jQuery datepicker localization

1
2
3
4
5
6
7
$('#date').datepicker({
	showAnim: 'fold',
	dayNamesMin: [ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub" ],
	monthNames: [ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac" ],
	dateFormat: 'dd.mm.yy',
	firstDay: 1
});
https://snipt.net/embed/003373c31578bb1a098d60852e9c771c/
/raw/003373c31578bb1a098d60852e9c771c/
003373c31578bb1a098d60852e9c771c
js
JavaScript
7
2019-07-31T20:46:38
True
False
False
/api/public/snipt/79176/
jquery-datepicker-localization
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#date&#39;</span><span class="p">).</span><span class="nx">datepicker</span><span class="p">({</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">showAnim</span><span class="o">:</span> <span class="s1">&#39;fold&#39;</span><span class="p">,</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">dayNamesMin</span><span class="o">:</span> <span class="p">[</span> <span class="s2">&quot;Ned&quot;</span><span class="p">,</span> <span class="s2">&quot;Pon&quot;</span><span class="p">,</span> <span class="s2">&quot;Uto&quot;</span><span class="p">,</span> <span class="s2">&quot;Sri&quot;</span><span class="p">,</span> <span class="s2">&quot;Čet&quot;</span><span class="p">,</span> <span class="s2">&quot;Pet&quot;</span><span class="p">,</span> <span class="s2">&quot;Sub&quot;</span> <span class="p">],</span> </span><span id="L-4"><a name="L-4"></a> <span class="nx">monthNames</span><span class="o">:</span> <span class="p">[</span> <span class="s2">&quot;Siječanj&quot;</span><span class="p">,</span> <span class="s2">&quot;Veljača&quot;</span><span class="p">,</span> <span class="s2">&quot;Ožujak&quot;</span><span class="p">,</span> <span class="s2">&quot;Travanj&quot;</span><span class="p">,</span> <span class="s2">&quot;Svibanj&quot;</span><span class="p">,</span> <span class="s2">&quot;Lipanj&quot;</span><span class="p">,</span> <span class="s2">&quot;Srpanj&quot;</span><span class="p">,</span> <span class="s2">&quot;Kolovoz&quot;</span><span class="p">,</span> <span class="s2">&quot;Rujan&quot;</span><span class="p">,</span> <span class="s2">&quot;Listopad&quot;</span><span class="p">,</span> <span class="s2">&quot;Studeni&quot;</span><span class="p">,</span> <span class="s2">&quot;Prosinac&quot;</span> <span class="p">],</span> </span><span id="L-5"><a name="L-5"></a> <span class="nx">dateFormat</span><span class="o">:</span> <span class="s1">&#39;dd.mm.yy&#39;</span><span class="p">,</span> </span><span id="L-6"><a name="L-6"></a> <span class="nx">firstDay</span><span class="o">:</span> <span class="mi">1</span> </span><span id="L-7"><a name="L-7"></a><span class="p">});</span> </span></pre></div> </td></tr></table>
datepicker, jQuery, js, localization