Daterangepicker Language / Date Format

5 replies · opened Jun 28, 2016

Aamadeus77Jun 28, 2016

Hi how to change date format and language for the daterangepicker from your example in component-datepicker.html:

// .daterange1
$(".daterange1").daterangepicker({
"buttonClasses": "button button-rounded button-mini nomargin",
"applyClass": "button-color",
"cancelClass": "button-light"
});

Tried to solve myself here: https://bootstrap-datepicker.readthedocs.io/en/latest/options.html
but don't get it :(

SSemicolon WebSTAFFJul 2, 2016

Hello,

  1. To Change the Date Format, please follow the instructions provided here: https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#format and then add the Option to the JS Code:
$(".daterange1").daterangepicker({
	format: 'MM/DD/YYYY',
	"buttonClasses": "button button-rounded button-mini nomargin",
	"applyClass": "button-color",
	"cancelClass": "button-light"
});
  1. Similarly, you can change the Language by adding this option: https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#language .

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

Aamadeus77Jul 4, 2016

With this code nothing changes- not the dateformat and not the language:

	//Daterangepicker
	$(".daterange1").daterangepicker({
			format: 'MM.DD.YYYY',
			"buttonClasses": "button button-rounded button-mini nomargin",
			"applyClass": "button-color",
			"cancelClass": "button-light", 
			language : "de-DE"
	});

Any idea?

Aamadeus77Jul 4, 2016

Again because the code pasted in was changed:

//Daterangepicker
$(".daterange1").daterangepicker({
format: 'MM.DD.YYYY',
"buttonClasses": "button button-rounded button-mini nomargin",
"applyClass": "button-color",
"cancelClass": "button-light", 
language : "de-DE"
});
Aamadeus77Jul 4, 2016

Oooops not possible to paste code in?

SSemicolon WebSTAFFJul 4, 2016

Hello,

We Really Apologize about the Misinformation. We read DatePicker instead of DateRangePicker due to which we provided you with the Wrong Documentation. We Really really Apologize about this.

Unfortunately, for the DateRangePicker the Format and Language settings currently is not supported since this PLugin does not support this and the Format and Language can be used as it comes inbuilt. Here is the Official Options Page: http://www.daterangepicker.com/#options . Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard