I have datetime-local html control on my form and I need to set date and time on it dynamically via JS or jQuery. How can I do it?
Here's a solution in formatting the date using momentjs. This will get the current date and time
moment().format('YYYY-MM-DDThh:mm:ss.SSS')