{"id":14971315,"url":"https://github.com/alexantr/yii2-datetimepicker","last_synced_at":"2026-02-27T12:36:54.326Z","repository":{"id":56944420,"uuid":"120796287","full_name":"alexantr/yii2-datetimepicker","owner":"alexantr","description":"Datetime picker input widget for Yii 2","archived":false,"fork":false,"pushed_at":"2018-06-21T15:54:15.000Z","size":11,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T02:48:00.763Z","etag":null,"topics":["datetime-picker","datetimepicker","flatpickr","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexantr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-08T17:49:48.000Z","updated_at":"2018-08-26T21:16:26.000Z","dependencies_parsed_at":"2022-08-21T07:20:14.759Z","dependency_job_id":null,"html_url":"https://github.com/alexantr/yii2-datetimepicker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fyii2-datetimepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fyii2-datetimepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fyii2-datetimepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexantr%2Fyii2-datetimepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexantr","download_url":"https://codeload.github.com/alexantr/yii2-datetimepicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240298400,"owners_count":19779280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["datetime-picker","datetimepicker","flatpickr","yii2","yii2-extension"],"created_at":"2024-09-24T13:45:00.818Z","updated_at":"2026-02-27T12:36:54.301Z","avatar_url":"https://github.com/alexantr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datetime picker input widget for Yii 2\n\nThis extension renders an input with [flatpickr](https://chmln.github.io/flatpickr/).\n\n## Installation\n\nInstall extension through [composer](http://getcomposer.org/):\n\n```\ncomposer require alexantr/yii2-datetimepicker\n```\n\n## Usage\n\nThe following code in a view file would render an input with color picker:\n\n```php\n\u003c?= alexantr\\datetimepicker\\DateTimePicker::widget(['name' =\u003e 'attributeName']) ?\u003e\n```\n\nIf you want to use this input widget in an ActiveForm, it can be done like this:\n\n```php\n\u003c?= $form-\u003efield($model, 'attributeName')-\u003ewidget(alexantr\\datetimepicker\\DateTimePicker::className()) ?\u003e\n```\n\nConfiguring the [flatpickr options](https://chmln.github.io/flatpickr/options/) should be done\nusing the `clientOptions` attribute:\n\n```php\n\u003c?= alexantr\\datetimepicker\\DateTimePicker::widget([\n    'name' =\u003e 'attributeName',\n    'clientOptions' =\u003e [\n        'allowInput' =\u003e false,\n        'enableTime' =\u003e false,\n        'enableSeconds' =\u003e false,\n        'dateFormat' =\u003e 'Y-m-d',\n    ],\n]) ?\u003e\n```\n\nBy default widget uses flatpickr's options:\n\n```php\n[\n    'allowInput' =\u003e true,\n    'dateFormat' =\u003e 'Y-m-d H:i:S',\n    'enableTime' =\u003e true,\n    'enableSeconds' =\u003e true,\n    'minuteIncrement' =\u003e 1,\n    'time_24hr' =\u003e true,\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexantr%2Fyii2-datetimepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexantr%2Fyii2-datetimepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexantr%2Fyii2-datetimepicker/lists"}