Skip to content

Commit

Permalink
Get the momentjs lang by default
Browse files Browse the repository at this point in the history
When you set the global language on momentjs, the datepicker set the language to english by default.
Is better to set this by the momentjs object.

I also fixed a minor error in line 47: requried -> required
  • Loading branch information
Davidhidalgo committed Jan 17, 2014
1 parent e2a511c commit fc5a55a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/bootstrap-datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
(function ($, moment) {
if (typeof moment === 'undefined') {
alert("momentjs is requried");
throw new Error('momentjs is requried');
throw new Error('momentjs is required');
};

var dpgId = 0,
Expand All @@ -62,7 +62,7 @@
startDate: new pMoment({ y: 1970 }),
endDate: new pMoment().add(50, "y"),
collapse: true,
language: "en",
language: pMoment.lang(),
defaultDate: "",
disabledDates: [],
enabledDates: false,
Expand Down

0 comments on commit fc5a55a

Please sign in to comment.