Bootstrap datetimepicker - How to set all picker tooltips at once? <p>The following are my example codes:</p> <pre><code>$('#ex1').datetimepicker({ tooltips: { today: 'today', clear: 'clear', close: 'close', }, format: 'YYYY/MM/DD', locale: 'zh-tw', }); $('#ex2').datetimepicker({ tooltips: { today: 'today', clear: 'clear', close: 'close', }, format: 'YYYY/MM/DD', locale: 'zh-tw', }); $('#ex3').datetimepicker({ tooltips: { today: 'today', clear: 'clear', close: 'close', }, format: 'YYYY/MM/DD', locale: 'zh-tw', }); </code></pre> <p>As above, the code is duplicate! How to set all picker tooltips and option at once?</p> <p>I have tried add them to "calendar" class, and use</p> <pre><code>$('.calendar').datetimepicker({ tooltips: { today: 'today', clear: 'clear', close: 'close', }, format: 'YYYY/MM/DD', locale: 'zh-tw', }); </code></pre> <p>to set them, but not working...</p> <p>Thank you!</p> <p>---Updated: --- These are my code about class:</p> <pre><code>&lt;input type='text' class="form-control calendar" id='leave-end'&gt; &lt;input type='text' class="form-control calendar" id='leave-start'&gt; </code></pre> <p>And:</p> <pre><code>$('.calendar').datetimepicker({ tooltips: { close: '關閉日曆', selectMonth: '選擇月份', prevMonth: '上個月', nextMonth: '下個月', selectYear: '選擇年份', prevYear: '前一年', nextYear: '下一年', }, format: 'YYYY/MM/DD', locale: 'zh-tw', }); </code></pre> <p>But not working and no error message, what wrong?</p> <p>And </p> <pre><code>var options = { tooltips: { today: 'today', clear: 'clear', close: 'close', }, format: 'YYYY/MM/DD', locale: 'zh-tw', } $('#leave-start').datetimepicker({options}); </code></pre> <p>I copy and paste but got 1 warning <code>jquery.min.js:2 jQuery.Deferred exception: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded</code> and 1 error <code>jquery.min.js:2 Uncaught RangeError: Maximum call stack size exceeded</code></p>