django-semantic-admin
django-semantic-admin copied to clipboard
How to show date picker (calendar)?
I can't put calendar as example in https://semantic-admin.com at field birthdate. Is necessary an other action ?
Other question, exists suports other languages like Pt-br on calendar?
Are you using the Django admin? It should be automatic if you inherit from SemanticModelAdmin, or one of the Semantic Inline classes.
As for languages other than English, this is not currently but should be supported. I'll fix it on the weekend to support setting the language, using Django's js translations for Pt-br.
Are you using the Django admin? It should be automatic if you inherit from SemanticModelAdmin, or one of the Semantic Inline classes. A. Yes, I am using Django Admin. But I not inherit from SemanticModelAdmin, but from Django Default admin. That was the error. Thanks for help me.
As for languages other than English, this is not currently but should be supported. I'll fix it on the weekend to support setting the language, using Django's js translations for Pt-br. A. That is a great news.
Version 0.2.7 was released with support for translations in the calendar.
You can see it in the demo:
That's great.
Is it possible edit time config too? I would like to set for dd/mm/YY.
There is a formatter setting. I published a new release using:
new Intl.DateTimeFormat({ dateStyle: 'short', timeStyle: 'short' }).format(date);
The result:
So, I realized that wasn't your request, and that I hadn't thought it through.
Documentation for the calendar was added.
TLDR
- Add the
javascript-catalog
to url_patterns - Add the
SEMANTIC_CALENDAR_OPTIONS
, to change theintlDateTimeFormatOptions
Closing, as I believe the issue was resolved