U
U
Urukhayy2018-02-05 17:02:07
JavaScript
Urukhayy, 2018-02-05 17:02:07

Which way are you concatenating Date and Time to create moment()?

As you know, by means of HTML, the date is obtained separately, and the time separately. In separate lines. What is the easiest way to create a single moment() based on them? What format to use and how to concatenate strings?
It's about the moment-library.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kn1ght_t, 2018-02-05
@Urukhayy

https://jsfiddle.net/6rorpsd7/

A
AxisPod, 2018-02-05
@AxisPod

The date still does not work with HTML, but with JS. If we are talking about the current one, then there is no need to reinvent the wheel.
will immediately return an object with the date and time.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question