Bagi memamparkan butang TODAY pada pilihan datepicker, setkan btntoday = true.
Buka fail .../bootstrap-datepicker/js/bootstrap-datepicker.js
, tukar setting di var defaults = $.fn.datepicker.defaults = { ... }
var defaults = $.fn.datepicker.defaults = { autoclose: false, beforeShowDay: $.noop, calendarWeeks: false, clearBtn: false, daysOfWeekDisabled: [], endDate: Infinity, forceParse: true, format: 'mm/dd/yyyy', keyboardNavigation: true, language: 'ms', minViewMode: 0, orientation: "auto", rtl: false, startDate: -Infinity, startView: 0, todayBtn: true, todayHighlight: false, weekStart: 0 };
Bagi menukar bahasa melayu, selain setting di atas tukar mode language: 'ms', tambah maklumat ms seperti di bawah. Tambah ms selepas en pada
var dates = $.fn.datepicker.dates = { en: { ... }, ms: { ... }};
var dates = $.fn.datepicker.dates = { en: { ... }, ms: { days: ["Ahad", "Isnin", "Selasa", "Rabu", "Khamis", "Jumaat", "Sabtu", "Ahad"], daysShort: ["Ahd", "Isn", "Sel", "Rbu", "Kha", "Jum", "Sab", "Ahd"], daysMin: ["Ahd", "Isn", "Sel", "Rbu", "Kha", "Jum", "Sab", "Ahd"], months: ["Januari", "Februari", "Mac", "April", "Mei", "Jun", "Julai", "Ogos", "September", "Oktober", "November", "Disember"], monthsShort: ["Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ogos", "Sep", "Okt", "Nov", "Dis"], today: "HARI INI", clear: "Clear" } };
Nota ini merujuk kepada datepicker versi di bawah.
* Copyright 2012 Stefan Petre * Improvements by Andrew Rowls