KoolReport's Forum

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

Week number on date picker #3159

Open Adolfo Alonso opened this topic on on Sep 29, 2023 - 6 comments

Adolfo Alonso commented on Sep 29, 2023

Hello, would it be possible to add the week number in the date picker like the following image:

Sebastian Morales commented on Oct 3, 2023

I'm afraid the current DateTimePicker of Inputs package doesn't have a show week number option. We will see if there's possibility to add another date picker that can show week number to Inputs package.

Adolfo Alonso commented on Oct 16, 2023

Thanks, please let me know. One more question regarding the date picker, how can I make it to initially load with the last 7 weeks data?

Sebastian Morales commented on Oct 17, 2023

Can you pls clarify more about last 7 weeks data? The DateTimePicker normally show full month of its current value which could be set in a report's defaultParamValues() function:

    protected function defaultParamValues()
    {
        return array(
            "startDatePicker"=>"2020-01-01 00:00:00", 
            ...
        );
    }
Adolfo Alonso commented on Oct 17, 2023

Hi Sebastian, I guess I erased that part of the code, I want to load the last 7 days when opening a report.

Adolfo Alonso commented on Oct 17, 2023

From the examples:

"dateRange": [

    "2023-10-17 00:00:00",
    "2023-10-17 23:59:59"
],

I want dateRange to be today()-7days everytime it loads

Sebastian Morales commented on Oct 17, 2023

Pls try this:

"dateRange": [

    date('Y-m-d', strtotime('-7 days')) . " 00:00:00",
    date('Y-m-d', strtotime('-7 days')) . " 23:59:59"
],

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

None