Jump to content

date format change

Recommended Posts

Perhaps this has more information for you:



The field that's shown is locale specific to browser. The date picker I see(Chrome) inputs as DD/MM/YYYY as that's how dates are written in New Zealand.


If you're referring to the output of the date input, then you'll need to look into string manipulation. Anything with locale based input should always output in a standard fashion. This allows any program using the output to function in any locale.

Share this post

Link to post
Share on other sites
On 10/13/2018 at 3:09 AM, rizwansyed said:


I need to get the time picker and display in format of DD/MM/YYYY.

I checked below example it is showing on YYYY-MM-DD format


How can i change it



Thanks and Regards

Rizwan Syed

You can change the function called as a quick and dirty solution.

	function myFunction() {
  var x = document.getElementById("myDate").value.split('-');
  document.getElementById("demo").innerHTML = x[1]+'/'+x[2]+'/'+x[0];


Share this post

Link to post
Share on other sites
22 hours ago, rizwansyed said:


I need to manually select 12 and 24 hr time format

How to get a 12 hr and 24 hr time picker .?

Is there any code or link available

Is this a change from your original request?

Is the time expected to be the time of the date selection? 
If not, where is the time selection supposed to be collected from?
What kind of time intervals - 0 to 23 hours? - any minutes/seconds required?
Difficult for me to envision solution with current information provided.  Sorry :(

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...