<h1 align='center'> Flask-Datepicker </h1>
<p align='center'>
<a href='https://pypi.org/project/Flask-Datepicker/'>
<img src='https://img.shields.io/github/v/tag/mrf345/flask_datepicker' alt='Latest Release' />
</a>
<a href='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml'>
<img src='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml/badge.svg'>
</a>
<a href='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml'>
<img src='https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mrf345/bc746d7bfe356b54fbb93b2ea5d0d2a4/raw/flask_datepicker__heads_master.json' alt='Coverage Percentage' />
</a>
<br />
<img src='https://img.shields.io/pypi/pyversions/flask_datepicker' alt='Supported versions' />
<br />
</p>
<h3 align='center'>A Flask extension for jQueryUI DatePicker, it makes adding and customizing multiple date pickers simpler and less time consuming.</h3>
## Install:
#### - With pip
- `pip install Flask-Datepicker` <br />
#### - From the source:
- `git clone https://github.com/mrf345/flask_datepicker.git`<br />
- `cd flask_datepicker` <br />
- `python setup.py install`
## Setup:
#### - Inside Flask app:
```python
from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_datepicker import Datepicker
app = Flask(__name__)
Bootstrap(app)
datepicker = Datepicker(app)
```
#### - Inside jinja template:
```jinja
{% extends 'bootstrap/base.html' %}
{% block scripts %}
{{ super() }}
{{ datepicker.loader() }} {# to load jQuery-ui #}
{{ datepicker.picker(id=".dp") }}
{% endblock %}
{% block content %}
<form class="verticalform">
<input type="text" class="form-control dp" />
</form>
{% endblock %}
```
## Settings:
#### - Options:
the accepted arguments to be passed to the `datepicker.picker()`:
```python
def picker(id=".datepicker", # identifier will be passed to Jquery to select element
dateFormat='yy-mm-dd', # can't be explained more !
maxDate='2018-12-30', # maximum date to select from. Make sure to follow the same format yy-mm-dd
minDate='2017-12-01', # minimum date
btnsId='.btnId' # id assigned to instigating buttons if needed
):
```
##### - Themes
`datepicker.loader()` allows you to select a specific theme of your choice via:
```python
datepicker.loader(theme="base")
```
_If there is not a theme selected, the extension will select a new random theme with each reload of the page to be used. To make it remember the random choice, pass :_
```python
datepicker.loader(random_remember=True)
```
_List of available themes :_ <br />
`
['base', 'black-tie', 'blitzer' 'cupertino','dark-hive', 'dot-luv', 'eggplant', 'excite-bike', 'flick', 'hot-sneaks', 'humanity', 'le-frog','mint-choc', 'overcast', 'pepper-grinder', 'redmond','smoothness', 'south-street', 'start', 'sunny','swanky-purse', 'trontastic', 'ui-darkness','ui-lightness', 'vader']
`
#### - Local source:
by default the extension will load jQueryUI plugin from [a remote CDN][25530337]. Although you can configure that to be locally through passing a list of two files .js and .css into the datepicker module like such:
```python
datepicker(app=app, local=['static/js/jquery-ui.js', 'static/css/jquery-ui.css'])
```
[25530337]: https://code.jquery.com/ui/ "Jquery-ui CDN"
## Credit:
> - [Datepicker][1311353e]: jQuery-ui date picker.
[1311353e]: https://jqueryui.com/datepicker/ "jQuery-UI website"
Raw data
{
"_id": null,
"home_page": "https://github.com/mrf345/flask_datepicker/",
"name": "Flask-Datepicker",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "flask, extension, date, picker, jquery-ui, datepicker",
"author": "Mohamed Feddad",
"author_email": "mrf345@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/39/08/f67ed10eec314ca9b88c5c2ffea0503ab3d7eb3fce7bf9650d5cf0a3d23c/flask_datepicker-0.16.tar.gz",
"platform": "any",
"description": "<h1 align='center'> Flask-Datepicker </h1>\n<p align='center'>\n<a href='https://pypi.org/project/Flask-Datepicker/'>\n <img src='https://img.shields.io/github/v/tag/mrf345/flask_datepicker' alt='Latest Release' />\n</a>\n<a href='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml'>\n <img src='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml/badge.svg'>\n</a>\n<a href='https://github.com/mrf345/flask_datepicker/actions/workflows/ci.yml'>\n <img src='https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/mrf345/bc746d7bfe356b54fbb93b2ea5d0d2a4/raw/flask_datepicker__heads_master.json' alt='Coverage Percentage' />\n</a>\n<br />\n<img src='https://img.shields.io/pypi/pyversions/flask_datepicker' alt='Supported versions' />\n<br />\n</p>\n\n<h3 align='center'>A Flask extension for jQueryUI DatePicker, it makes adding and customizing multiple date pickers simpler and less time consuming.</h3>\n\n## Install:\n#### - With pip\n- `pip install Flask-Datepicker` <br />\n\n#### - From the source:\n- `git clone https://github.com/mrf345/flask_datepicker.git`<br />\n- `cd flask_datepicker` <br />\n- `python setup.py install`\n\n## Setup:\n#### - Inside Flask app:\n```python\nfrom flask import Flask, render_template\nfrom flask_bootstrap import Bootstrap\nfrom flask_datepicker import Datepicker\n\napp = Flask(__name__)\nBootstrap(app)\ndatepicker = Datepicker(app)\n```\n\n#### - Inside jinja template:\n```jinja\n{% extends 'bootstrap/base.html' %}\n{% block scripts %}\n {{ super() }}\n {{ datepicker.loader() }} {# to load jQuery-ui #}\n {{ datepicker.picker(id=\".dp\") }}\n{% endblock %}\n{% block content %}\n <form class=\"verticalform\">\n <input type=\"text\" class=\"form-control dp\" />\n </form>\n{% endblock %}\n```\n\n## Settings:\n#### - Options:\nthe accepted arguments to be passed to the `datepicker.picker()`:\n```python\ndef picker(id=\".datepicker\", # identifier will be passed to Jquery to select element\n dateFormat='yy-mm-dd', # can't be explained more !\n maxDate='2018-12-30', # maximum date to select from. Make sure to follow the same format yy-mm-dd\n minDate='2017-12-01', # minimum date\n btnsId='.btnId' # id assigned to instigating buttons if needed\n): \n```\n\n##### - Themes\n`datepicker.loader()` allows you to select a specific theme of your choice via:\n```python\ndatepicker.loader(theme=\"base\")\n```\n\n_If there is not a theme selected, the extension will select a new random theme with each reload of the page to be used. To make it remember the random choice, pass :_\n```python\ndatepicker.loader(random_remember=True)\n```\n\n_List of available themes :_ <br />\n`\n['base', 'black-tie', 'blitzer' 'cupertino','dark-hive', 'dot-luv', 'eggplant', 'excite-bike', 'flick', 'hot-sneaks', 'humanity', 'le-frog','mint-choc', 'overcast', 'pepper-grinder', 'redmond','smoothness', 'south-street', 'start', 'sunny','swanky-purse', 'trontastic', 'ui-darkness','ui-lightness', 'vader']\n`\n\n#### - Local source:\nby default the extension will load jQueryUI plugin from [a remote CDN][25530337]. Although you can configure that to be locally through passing a list of two files .js and .css into the datepicker module like such:\n```python\ndatepicker(app=app, local=['static/js/jquery-ui.js', 'static/css/jquery-ui.css'])\n```\n\n[25530337]: https://code.jquery.com/ui/ \"Jquery-ui CDN\"\n\n## Credit:\n> - [Datepicker][1311353e]: jQuery-ui date picker.\n\n [1311353e]: https://jqueryui.com/datepicker/ \"jQuery-UI website\"\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Flask extension for jQueryUI DatePicker.",
"version": "0.16",
"project_urls": {
"Download": "https://github.com/mrf345/flask_datepicker/archive/0.16.tar.gz",
"Homepage": "https://github.com/mrf345/flask_datepicker/"
},
"split_keywords": [
"flask",
" extension",
" date",
" picker",
" jquery-ui",
" datepicker"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c7e209223121c8aa9fb03314e00ca81f5e1eaa31f4a80e768e38415eab9ad163",
"md5": "73b8b3b28960ad38c85a44adbab063dd",
"sha256": "28623a5db52d4f15166a59c2aaeb9f206017ea7f4ebb1b02e017d927250169f0"
},
"downloads": -1,
"filename": "Flask_Datepicker-0.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73b8b3b28960ad38c85a44adbab063dd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7441,
"upload_time": "2024-07-22T19:28:21",
"upload_time_iso_8601": "2024-07-22T19:28:21.219695Z",
"url": "https://files.pythonhosted.org/packages/c7/e2/09223121c8aa9fb03314e00ca81f5e1eaa31f4a80e768e38415eab9ad163/Flask_Datepicker-0.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3908f67ed10eec314ca9b88c5c2ffea0503ab3d7eb3fce7bf9650d5cf0a3d23c",
"md5": "f79e18b2fa006d08a0eae6a3be8e5530",
"sha256": "f3058c33baf16bd42e7051107cd896a5bd6b97904e690ccf4267f71c32971dc8"
},
"downloads": -1,
"filename": "flask_datepicker-0.16.tar.gz",
"has_sig": false,
"md5_digest": "f79e18b2fa006d08a0eae6a3be8e5530",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6829,
"upload_time": "2024-07-22T19:28:26",
"upload_time_iso_8601": "2024-07-22T19:28:26.259781Z",
"url": "https://files.pythonhosted.org/packages/39/08/f67ed10eec314ca9b88c5c2ffea0503ab3d7eb3fce7bf9650d5cf0a3d23c/flask_datepicker-0.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-22 19:28:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mrf345",
"github_project": "flask_datepicker",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "flask-datepicker"
}