{"action":"created","issue":{"url":"https://api.github.com/repos/Nayjest/Grids/issues/158","repository_url":"https://api.github.com/repos/Nayjest/Grids","labels_url":"https://api.github.com/repos/Nayjest/Grids/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/Nayjest/Grids/issues/158/comments","events_url":"https://api.github.com/repos/Nayjest/Grids/issues/158/events","html_url":"https://github.com/Nayjest/Grids/issues/158","id":182496791,"number":158,"title":"Datepicker get the same date in from and to when using a query with another parameter ","user":{"login":"miltonagc2","id":22607256,"avatar_url":"https://avatars.githubusercontent.com/u/22607256?v=3","gravatar_id":"","url":"https://api.github.com/users/miltonagc2","html_url":"https://github.com/miltonagc2","followers_url":"https://api.github.com/users/miltonagc2/followers","following_url":"https://api.github.com/users/miltonagc2/following{/other_user}","gists_url":"https://api.github.com/users/miltonagc2/gists{/gist_id}","starred_url":"https://api.github.com/users/miltonagc2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miltonagc2/subscriptions","organizations_url":"https://api.github.com/users/miltonagc2/orgs","repos_url":"https://api.github.com/users/miltonagc2/repos","events_url":"https://api.github.com/users/miltonagc2/events{/privacy}","received_events_url":"https://api.github.com/users/miltonagc2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-12T11:01:50Z","updated_at":"2016-10-17T20:22:25Z","closed_at":null,"body":"The daterangepicker is asigning the same date for from and to when i have another filter in the query.\r\n\r\nThe code is like this:\r\n```\r\n  $query = \\DB::getDoctrineConnection()->createQueryBuilder();\r\n        $query\r\n            ->select([ 'ad.cuenta', 'a.fecha'])\r\n            ->from('asientos_detalles', 'ad')\r\n            ->innerJoin('ad', 'asientos', 'a', 'a.id = ad.asiento_id')\r\n            ->where('ad.cuenta = :cuenta_numero')\r\n            ->setParameter(':cuenta_numero', $cuenta_numero);\r\n        $grid = new Grid(\r\n            (new GridConfig)\r\n                ->setDataProvider(\r\n                   // new EloquentDataProvider(Asientos_detalles::where('cuenta', $cuenta_numero))\r\n                    new DbalDataProvider($query)\r\n                )\r\n                ->setName('asientos_detalles_grid')\r\n                ->setPageSize(20)\r\n                ->setColumns([\r\n(new FieldConfig)\r\n                        ->setName('fecha')\r\n                        ->setLabel('Fecha')\r\n                        ->setCallback(function ($val) {\r\n                            return \"{$val}\";\r\n                        })\r\n                        ->setSortable(true)\r\n                    ,\r\n(new FieldConfig)\r\n                        ->setName('cuenta')\r\n                        ->setLabel('cuenta')\r\n                        ->setCallback(function ($val) {\r\n                            #return \"{$val}\";\r\n                            $cuenta_seleccionada = Catalogo_cuentas::where('numero', $val)->first();\r\n                            return $val .'-'. $cuenta_seleccionada->nombre;\r\n                        })\r\n                        ->setSortable(true)\r\n                        ->addFilter(\r\n                            (new FilterConfig)\r\n                                ->setOperator(FilterConfig::OPERATOR_LIKE)\r\n                        )\r\n                    ,\r\n                ])\r\n                ->setComponents([\r\n                    (new THead)\r\n                        ->setComponents([\r\n                            (new ColumnHeadersRow),\r\n                            (new FiltersRow)\r\n                                ->addComponents([\r\n                                    (new RenderFunc(function () {\r\n                                        return HTML::style('js/daterangepicker-bs3.css')\r\n                                        . HTML::script('js/moment-with-locales.js')\r\n                                        . HTML::script('js/daterangepicker.js')\r\n                                        . HTML::style('css/daterangepicker-bs3.css')\r\n                                        . \"<style>\r\n                                                .daterangepicker td.available.active,\r\n                                                .daterangepicker li.active,\r\n                                                .daterangepicker li:hover {\r\n                                                    color:black !important;\r\n                                                    font-weight: bold;\r\n                                                }\r\n                                           </style>\";\r\n                                    }))\r\n                                        ->setRenderSection('filters_row_column_fecha'),\r\n                                    (new DateRangePicker)\r\n                                        ->setName('fecha')\r\n                                        ->setRenderSection('filters_row_column_fecha')\r\n                                       // ->setDefaultValue([null, null])\r\n                                        ->setDefaultValue(['2014-01-01', date('Y-m-d')])\r\n                                ])\r\n```\r\n                            \r\nThis does not show any records but if i do the same query in mysql, records ares listed as expected. Am i missing something. I migrated Laravel 5.2 to 5.3 and upgrade each component hoping to fix this but not luck. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Nayjest/Grids/issues/comments/254322248","html_url":"https://github.com/Nayjest/Grids/issues/158#issuecomment-254322248","issue_url":"https://api.github.com/repos/Nayjest/Grids/issues/158","id":254322248,"user":{"login":"miltonagc2","id":22607256,"avatar_url":"https://avatars.githubusercontent.com/u/22607256?v=3","gravatar_id":"","url":"https://api.github.com/users/miltonagc2","html_url":"https://github.com/miltonagc2","followers_url":"https://api.github.com/users/miltonagc2/followers","following_url":"https://api.github.com/users/miltonagc2/following{/other_user}","gists_url":"https://api.github.com/users/miltonagc2/gists{/gist_id}","starred_url":"https://api.github.com/users/miltonagc2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miltonagc2/subscriptions","organizations_url":"https://api.github.com/users/miltonagc2/orgs","repos_url":"https://api.github.com/users/miltonagc2/repos","events_url":"https://api.github.com/users/miltonagc2/events{/privacy}","received_events_url":"https://api.github.com/users/miltonagc2/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T20:22:25Z","updated_at":"2016-10-17T20:22:25Z","body":"i tried your code en the $value array has the correct date range but the query still get the wrong dates."}}
{"actor":{"display_login":"miltonagc2"}}