KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Inputs: DateTimePicker -> changing the localization from EN to DE #118

Open bysystem opened this topic on on Sep 25, 2017 - 2 comments

bysystem commented on Sep 25, 2017

Dear support team,

I've added the DateTimePicker into my code as follows and it works fine:

use \koolreport\inputs\DateTimePicker; ... ...

			<div class="form-group" style="width:250px;margin-right:10px;">
				<?php DateTimePicker::create(array(
					"name"=>"vonDatum",
					//"maxDate"=>"@endDatePicker",
					"format"=>"DD.MM.YYYY",
					//"todayBtn"=>true
				));
				?> 
			</div>					

			<div class="form-group" style="width:250px;margin-right:10px;">
				<?php DateTimePicker::create(array(
					"name"=>"bisDatum",
					//"minDate"=>"@startDatePicker",
					"format"=>"DD.MM.YYYY"
				));
				?> 
			</div>

I would like to do 2 things:

  1. Add a "Today" button for changing automaticall today's date (I tried it above with "today"=>true , but without any success!)
  2. Change the localization for the days, months etc. from EN to DE (German language).

How can I do this?

Kind regards

KoolReport commented on Sep 25, 2017

Great question, you do this:

...
"options"=>array(
    "locale"=>"de",
    "tooltips"=>array(
        "selectMonth"=>"{select month in germany}",
        ...
    )
)
...

To customize the tooltips, here is the full list.

bysystem commented on Sep 26, 2017

Excellent! It does exactly what I need!

Thx a lot for your great support!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

Inputs