{"id":20698978,"url":"https://github.com/mwsimple/scdatetimepickerbundle","last_synced_at":"2025-08-20T20:31:50.477Z","repository":{"id":57022464,"uuid":"113470485","full_name":"MWSimple/SCDatetimepickerBundle","owner":"MWSimple","description":"Datetime Picker Bundle Symfony 3","archived":false,"fork":false,"pushed_at":"2024-11-07T13:16:26.000Z","size":91,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-12T14:22:32.701Z","etag":null,"topics":["datetimepicker","symfony"],"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/MWSimple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-07T15:56:01.000Z","updated_at":"2024-11-07T13:12:46.000Z","dependencies_parsed_at":"2024-06-21T15:34:27.604Z","dependency_job_id":"a3108c71-c416-46c5-abc4-a3d89d177d6f","html_url":"https://github.com/MWSimple/SCDatetimepickerBundle","commit_stats":{"total_commits":10,"total_committers":5,"mean_commits":2.0,"dds":0.6,"last_synced_commit":"7afda1d2dbaaf0df12037c8e93df34d9c0e29384"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWSimple%2FSCDatetimepickerBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWSimple%2FSCDatetimepickerBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWSimple%2FSCDatetimepickerBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MWSimple%2FSCDatetimepickerBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MWSimple","download_url":"https://codeload.github.com/MWSimple/SCDatetimepickerBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230454423,"owners_count":18228392,"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":["datetimepicker","symfony"],"created_at":"2024-11-17T00:27:38.283Z","updated_at":"2024-12-19T15:07:41.338Z","avatar_url":"https://github.com/MWSimple.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#DatetimepickerBundle\n\nThis bundle implements the [Bootstrap DateTime Picker](https://github.com/smalot/bootstrap-datetimepicker) in a Form Type for Symfony 3. The bundle structure is inspired by GenemuFormBundle.\n\nDemo : http://www.malot.fr/bootstrap-datetimepicker/demo.php\n\nPlease feel free to contribute, to fork, to send merge request and to create ticket.\n\n##Installation\n\n### Step 1: Install DatetimepickerBundle\n\n```bash\nphp composer.phar require mwsimple/scdatetimepicker-bundle\n```\n\n### Step 2: Enable the bundle\n\n``` php\n\u003c?php\n// app/AppKernel.php\n\npublic function registerBundles()\n{\n    $bundles = array(\n        // ...\n        new SC\\DatetimepickerBundle\\SCDatetimepickerBundle(),\n    );\n}\n```\n\n``` yml\n# app/config/config.yml\nsc_datetimepicker:\n    picker: ~\n```\n\n### Step 3: Initialize assets\n\n``` bash\n$ php app/console assets:install web/\n```\n\n## Usages\n\n``` php\n\u003c?php\n// ...\nuse SC\\DatetimepickerBundle\\Form\\Type\\DatetimeType;\n\npublic function buildForm(FormBuilder $builder, array $options)\n{\n    $builder\n        // defaut options\n        -\u003eadd('createdAt', DatetimeType::class) \n        \n        // full options\n        -\u003eadd('updatedAt', DatetimeType::class, array( 'pickerOptions' =\u003e\n            array('format' =\u003e 'mm/dd/yyyy',\n                'weekStart' =\u003e 0,\n                'startDate' =\u003e date('m/d/Y'), //example\n                'endDate' =\u003e '01/01/3000', //example\n                'daysOfWeekDisabled' =\u003e '0,6', //example\n                'autoclose' =\u003e false,\n                'startView' =\u003e 'month',\n                'minView' =\u003e 'hour',\n                'maxView' =\u003e 'decade',\n                'todayBtn' =\u003e false,\n                'todayHighlight' =\u003e false,\n                'keyboardNavigation' =\u003e true,\n                'language' =\u003e 'en',\n                'forceParse' =\u003e true,\n                'minuteStep' =\u003e 5,\n                'pickerReferer ' =\u003e 'default', //deprecated\n                'pickerPosition' =\u003e 'bottom-right',\n                'viewSelect' =\u003e 'hour',\n                'showMeridian' =\u003e false,\n                'initialDate' =\u003e date('m/d/Y', 1577836800), //example\n                ))) ; \n\n}\n```\n\nAdd form_javascript and form_stylesheet\n\nThe principle is to separate the javascript, stylesheet and html.\nThis allows better integration of web pages.\n\n### Example:\n\n``` twig\n{% block stylesheets %}\n    \u003clink href=\"{{ asset('css/bootstrap.min.css') }}\" rel=\"stylesheet\" /\u003e\n    \n    {{ form_stylesheet(form) }}\n{% endblock %}\n\n{% block javascripts %}\n    \u003cscript src=\"{{ asset('js/jquery.min.js') }}\"\u003e\u003c/script\u003e\n    \u003cscript src=\"{{ asset('js/bootstrap.min.js') }}\"\u003e\u003c/script\u003e\n    \n    {{ form_javascript(form) }}\n{% endblock %}\n\n{% block body %}\n    \u003cform action=\"{{ path('my_route_form') }}\" type=\"post\" {{ form_enctype(form) }}\u003e\n        {{ form_widget(form) }}\n\n        \u003cinput type=\"submit\" /\u003e\n    \u003c/form\u003e\n{% endblock %}\n```\n\n## Documentation\n\nThe documentation of the datetime picker is here : http://www.malot.fr/bootstrap-datetimepicker/#options\n\n## Notes\n\nThe date format from ``` php 'pickerOptions' =\u003e array('format'=\u003e'dd MM yyyy - HH:ii p') ``` is used to set automatically the date format of Symfony in order to make compatible Symfony and JavaScript output.\nBut there are some problems for example with ``` php MM``` which display \"décembre\" in PHP intl translation and \"Decembre\" in Bootstrap translation. That is why I edited js/locales/bootstrap-datetimepicker.fr.js\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwsimple%2Fscdatetimepickerbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmwsimple%2Fscdatetimepickerbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmwsimple%2Fscdatetimepickerbundle/lists"}