Input time for browser

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
GabssW
Newbie
Newbie
Posts: 5
Joined: 2021-08-24, 18:02

Input time for browser

Unread post by GabssW » 2021-08-24, 18:05

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

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Input time for browser

Unread post by Moonchild » 2021-08-24, 20:27

I'm sorry but I have no idea what you mean with your post. can you please elaborate?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Input time for browser

Unread post by vannilla » 2021-08-24, 20:31

Maybe it's something like new Date()? :crazy:

User avatar
GabssW
Newbie
Newbie
Posts: 5
Joined: 2021-08-24, 18:02

Re: Input time for browser

Unread post by GabssW » 2021-08-25, 12:52

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)

User avatar
GabssW
Newbie
Newbie
Posts: 5
Joined: 2021-08-24, 18:02

Re: Input time for browser

Unread post by GabssW » 2021-08-25, 13:04

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

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Input time for browser

Unread post by Moonchild » 2021-08-25, 17:31

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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Input time for browser

Unread post by vannilla » 2021-08-25, 17:45

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.

User avatar
GabssW
Newbie
Newbie
Posts: 5
Joined: 2021-08-24, 18:02

Re: Input time for browser

Unread post by GabssW » 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.

New Tobin Paradigm

Re: Input time for browser

Unread post by New Tobin Paradigm » 2021-08-26, 14:32

Actions sometimes have consequences, sometimes.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Input time for browser

Unread post by Moonchild » 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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
GabssW
Newbie
Newbie
Posts: 5
Joined: 2021-08-24, 18:02

Re: Input time for browser

Unread post by GabssW » 2021-08-26, 18:05

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

User avatar
opus_27
Apollo supporter
Apollo supporter
Posts: 36
Joined: 2020-06-16, 13:29

Re: Input time for browser

Unread post by opus_27 » 2021-08-26, 20:37

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).

Locked