KoolReport's Forum

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

DateTimePicker Display Issues #1170

Open Jason opened this topic on on Nov 20, 2019 - 4 comments

Jason commented on Nov 20, 2019

I have tried everything, however i am unable to get the DateTimePicker Input to display properly. Can you look into what would cause this?

KoolReport commented on Nov 20, 2019

It seems to me that bootstrap has not been loaded. The datetimepicker requires bootstrap enabled.

Jason commented on Nov 20, 2019

I have referenced it in my class file and my view file, and neither seems to change the display issue.

<?php

require_once $_SERVER['DOCUMENT_ROOT']."/koolreport/core/autoload.php";
require_once $_SERVER['DOCUMENT_ROOT']."/reports/connect.php";


class Trends extends \koolreport\KoolReport
{
	use \koolreport\export\Exportable;
	use \koolreport\amazing\Theme;
        use \koolreport\clients\Bootstrap;
        use \koolreport\inputs\Bindable;
        use \koolreport\inputs\POSTBinding;

    protected function defaultParamValues()
    {
        return array(
            "startDatePicker"=>date("Y-m-d 00:00:00"),
            "endDatePicker"=>date("Y-m-d 23:59:59"),
            "radioList"=>"",
        );
    }

    protected function bindParamsToInputs()
    {
        return array(
            "startDatePicker",
            "endDatePicker",
            "radioList"=>"",
        );
    }
	
    public function settings()
    {
		GLOBAL $config;
        return array(
            "dataSources"=>array(
                "accutrack"=>array(
                    "connectionString"=>"mysql:host=".$config["dbhost"].";dbname=".$config["dbname"],
                    "username"=>$config["dbuser"],
                    "password"=>$config["dbpw"],
                    "charset"=>$config["charset"]
                )
            )
        );
    } 

}

?>
Jason commented on Nov 20, 2019

I have corrected the issue...

Apparently I needed to reference it only in the view file, and put it as the last reference in my list of "use".

However there is one other issue....

I do not see the clock icon for time selector, as it shows in the demo, do i need to add a property to display this icon?

KoolReport commented on Nov 21, 2019

Please try this:

DateTimePicker::create(array(
    ...
    "options"=>array(
        "icons"=>array(
            "time"=>"far fa-clock",
        )
    )
));

Since we have just upgrade the font-awesome from 4.7 to 5.2 so there is small changes in name of css class.

BTW, if you are using Amazing theme, you do not need to use clients/Bootstrap since amazing theme has included it.

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
help needed

Inputs