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

How to use Date filter in render field #99

Open
amitchavan90 opened this issue Jun 5, 2020 · 4 comments
Open

How to use Date filter in render field #99

amitchavan90 opened this issue Jun 5, 2020 · 4 comments

Comments

@amitchavan90
Copy link

{% render_field signupForm.date_of_birth value=request.user.date_of_birth|date:"Y-m-d" class="form-control datepicker" id="date_of_birth" required="true"%}

if you see i want format Y-m-d, but Im not able to use that filter. Django throws error.

Thank you.

@zodman
Copy link
Member

zodman commented Jun 5, 2020

I think you need initialize on the part of the view and not on the template. That break django api

@amitchavan90
Copy link
Author

Cool.
But having this implemented in this library will make it more useful.
Just a suggestion.

@zodman
Copy link
Member

zodman commented Jun 5, 2020

So change the title to a feature request instead of a question. Thanks!

@RajvirS99
Copy link

I tried to do the same thing but it is still not working on my side @zodman

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

3 participants