Page 1 of 1

Input time for browser

Posted: 2021-08-24, 18:05
by GabssW
Hi. I am a developer and in my company use Pale Moon as one of the browsers. My question is what is the best input for the time I can use in Pale Moon? if possible send it formatted here with the tag and what code to use

Re: Input time for browser

Posted: 2021-08-24, 20:27
by Moonchild
I'm sorry but I have no idea what you mean with your post. can you please elaborate?

Re: Input time for browser

Posted: 2021-08-24, 20:31
by vannilla
Maybe it's something like new Date()? :crazy:

Re: Input time for browser

Posted: 2021-08-25, 12:52
by GabssW
Moonchild wrote:
2021-08-24, 20:27
I'm sorry but I have no idea what you mean with your post. can you please elaborate?
I need a way to create a field that only accepts number (time)

Re: Input time for browser

Posted: 2021-08-25, 13:04
by GabssW
vannilla wrote:
2021-08-24, 20:31
Maybe it's something like new Date()? :crazy:
Maybe. I'm using ReactJS

Re: Input time for browser

Posted: 2021-08-25, 17:31
by Moonchild
GabssW wrote:
2021-08-25, 12:52
I need a way to create a field that only accepts number (time)
That's super basic HTML.
https://www.w3schools.com/tags/att_inpu ... number.asp
GabssW wrote:
2021-08-25, 13:04
I'm using ReactJS
I suggest you don't use a bloated framework like that if you're trying to do something simple. Just stick to HTML+CSS+maybe some JS.
I don't know in what way ReactJS handles input fields.

Re: Input time for browser

Posted: 2021-08-25, 17:45
by vannilla
GabssW wrote:
2021-08-25, 13:04
Maybe. I'm using ReactJS
Unless you are using something coming with its own CSS that forces you to use its own components, whatever you do script-wise shouldn't matter.

Re: Input time for browser

Posted: 2021-08-26, 14:29
by GabssW
As it's a project we've already used reactJS for, I don't have the option of not using React. The solution would have to be in the react itself.

Re: Input time for browser

Posted: 2021-08-26, 14:32
by New Tobin Paradigm
Actions sometimes have consequences, sometimes.

Re: Input time for browser

Posted: 2021-08-26, 15:58
by Moonchild
GabssW wrote:
2021-08-26, 14:29
As it's a project we've already used reactJS for, I don't have the option of not using React. The solution would have to be in the react itself.
Then you will have to ask someone fluent in the ReactJS framework how to do this. Pale Moon does not specifically cater to frameworks; it caters to standards like HTML and CSS and ECMAScript. If React doesn't have the capabilities you need then you can't blame us for its shortcomings, either.

Re: Input time for browser

Posted: 2021-08-26, 18:05
by GabssW
Moonchild wrote:
2021-08-26, 15:58
GabssW wrote:
2021-08-26, 14:29
As it's a project we've already used reactJS for, I don't have the option of not using React. The solution would have to be in the react itself.
Then you will have to ask someone fluent in the ReactJS framework how to do this. Pale Moon does not specifically cater to frameworks; it caters to standards like HTML and CSS and ECMAScript. If React doesn't have the capabilities you need then you can't blame us for its shortcomings, either.
Yes, I'm not blaming anyone. Just trying to find a solution... but thanks

Re: Input time for browser

Posted: 2021-08-26, 20:37
by opus_27
If your ReactJS code is going to present the users with HTML, presumably you can create HTML DOM elements in it; if so, you might wish to consult MDN's reference on <input> types, especially time (and maybe also date, datetime-local, or—reportedly obsolete—datetime).