XoopsCore25 icon indicating copy to clipboard operation
XoopsCore25 copied to clipboard

XoopsFormTextDateSelect null / empty

Open nitrix78 opened this issue 3 years ago • 6 comments

Hello, it's not possible to have a empty date in XoopsFormTextDateSelect It miss. If it's null or 0, don't put time() by default.

nitrix78 avatar Feb 17 '22 11:02 nitrix78

I don't think that's a good solution. To have an empty date I advise to do like this:

image

Then just manage the option in your code

GregMage avatar Feb 17 '22 16:02 GregMage

In some case, i need to have an empy datetime (in specific form, by example: a deleted date of a product). It's a business need, it's the controler to choose if the default date is time(), not plateform to force it. With XoopsFormTextDateSelect it's not possible.

It seem there is a parameter who can make it in a previous version of Xoops : https://xoops.org/modules/newbb/viewtopic.php?topic_id=70482

nitrix78 avatar Feb 17 '22 16:02 nitrix78

I had to made my own control for made it: https://www.frxoops.org/modules/newbb/viewtopic.php?post_id=243082&topic_id=38313&forum=5#forumpost243082

nitrix78 avatar Feb 17 '22 16:02 nitrix78

That's what I was going to suggest, create your own class for your needs. For compatibility reasons, it is not wise to modify the class XoopsFormDateSelect

GregMage avatar Feb 17 '22 19:02 GregMage

OK, but for future version, it will appreciable tu not have to do this easy

nitrix78 avatar Feb 17 '22 21:02 nitrix78

There are several date/time related issues in XOOPS that will be resolved in the next generation.

geekwright avatar Feb 19 '22 01:02 geekwright