Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picker always sets field to current date/time, whatever is selected #55

Open
francisjervis opened this issue May 22, 2016 · 0 comments
Open

Comments

@francisjervis
Copy link

francisjervis commented May 22, 2016

Hi, I am having this issue with the picker: it displays correctly, but the first time you click on a day, the current date and time appear in the field, instead of the selected value. After this, the field value cannot be changed, no date other than the current one can ever be entered. However, the selection indicator in the picker does change based on clicks. My code in forms.py is:

    select_start_date = forms.DateTimeField(label="Select the start date and time for your request",
        required=True,
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
                                      "pickSeconds": False})
                                       )

And in the html template file the form renders to:

   <script type="text/javascript">
    $(function () {
        $('#id_select_start_date').datetimepicker();
    });
    </script>

Thanks for any help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant