How to add a new Input Field Type?
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #25
RE: How to add a new Input Field Type?
(09-25-2015 01:51 PM)ollie2015 Wrote:  is there a JS to add a time to the date? thanks

Javascript Code
new Date(new Date('2000-01-01 12:00:22') + 3600*1000).toString()


(09-25-2015 01:51 PM)ollie2015 Wrote:  ALSO
what regex would i need for

Code:
16/09/2015 00:00

Code:
^\d\d/\d\d/\d\d\d\d \d\d\:\d\d$

May vary depending on what validation you want and pattern capturing.

(09-25-2015 01:51 PM)ollie2015 Wrote:  my_date('d-m-Y H:i',{VALUE})

EDIT: I am having trouble with timezone i guess, 7hrs behind, but why? I add the date and then edit the post and its 7 hrs behind....

how can i correct this?
If you're applying the timezone correction twice, then times are going to be off.  Don't use my_date if you intend to use it later, because it will correct timezone (use date instead).

My Blog
10-29-2015 01:19 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a new Input Field Type? - ZiNgA BuRgA - 10-29-2015 01:19 PM

 Standard Tools
Forum Jump: