you can pass your format to IS_DATE or IS_DATETIME validator

http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#IS_DATE

..., requires = IS_DATE(format=T('%Y-%m-%d'), error_message='must be
YYYY-MM-DD!')


Il giorno mer 29 set 2021 alle ore 01:13 黄祥 <steve.van.chris...@gmail.com>
ha scritto:

> hi,
>
> html form field date in web2py form (2.21.1-stable version) is showing
> format DD-MM-YYYY expected YYYY-MM-DD
> tested using datetime is same, showing DD-MM-YYYY HH:MM:SS expected
> YYYY-MM-DD HH:MM:SS
> tested using SQLFORM() and SQLFORM.grid()
> both tested using chrome and firefox
>
> is there any way to fix it ?
>
> thanks and best regards,
> stifan
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/18b4ebe6-5a23-4302-af43-355fe56caf65n%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/18b4ebe6-5a23-4302-af43-355fe56caf65n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Massimiliano

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CANPTPxKpxHrf2x79pvpHbHkvetuX22jZDQHjR6ncfwMpayLA6g%40mail.gmail.com.

Reply via email to