1
timgno
XoopsFormTime Class
  • 2016/4/28 7:25

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Why, it's never a class only for time was created?

First I would like to create your own!

I need a single select box for the 'start' and 'end' distinct time from the date!

If I want once I'm forced to put his hand to the class XoopsFormDateTime

2
Mamba
Re: XoopsFormTime Class
  • 2016/4/29 18:45

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Create a class and submit it. If it's good and seen as needed/justified, I am sure, the Core Team will consider it.

You might also take a look at XoopsPoll, where Zyspec added a "TimePicker" add-on
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
timgno
Re: XoopsFormTime Class
  • 2016/5/18 20:16

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Ok!
As soon as possible I will send it on github for XOOPS 2.5.x, and XOOPS 2.6

4
zyspec
Re: XoopsFormTime Class
  • 2016/5/19 13:47

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Another option, depending on your audience, is to use the new HTML5 input types. If you only need time you could use the "type=time". If you're looking for users to to enter a starting time/date and ending time/date then type="datetime-local" might be a good solution.

5
timgno
Re: XoopsFormTime Class
  • 2016/5/19 15:41

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


But it's supported by all browsers?

This is the problem, otherwise you're right to use the html5 tag

6
zyspec
Re: XoopsFormTime Class
  • 2016/5/19 16:50

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


No, they're not supported by "all browsers". That's why I said:
Quote:
depending on your audience
Of course the newer HTML5 features will never be supported by "all browsers" (think older versions) but at some point you can cover a majority of your users. Most browsers will default to "text" so even browsers that don't support the new 'type' will allow a user to enter the information, it's just not pretty - and of course will still need to be validated on the server (which it should be anyway).

7
timgno
Re: XoopsFormTime Class
  • 2016/5/20 10:03

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


This is the result:

Resized Image


Files added on github

Login

Who's Online

377 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 377


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits