Click here to Skip to main content
15,914,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need a datetime textbox with IST also in html. in which i select the date format like '
03.04.2020 10:35 +0530
'

can any one suggest me solutions.

What I have tried:

i will try datetimepicker but i dont understand how to use it.
Posted
Updated 3-Apr-20 7:40am

1 solution

Mozilla has a good write-up on the DateTime input type along with it's DateTime-Local variant. I would suggest you read through this to learn how the HTML DatePicker works
<input type="datetime-local"> - HTML: Hypertext Markup Language | MDN[^]

As for displaying in it in IST (which your sample is not), I would recommend on reading up on the JavaScript Date & Time formatting options
JavaScript Date Formats[^]
How to get DateTime with Timezone Offset (8601 format) in Javascript[^]
How to format a JavaScript date - Stack Overflow[^]

There is plenty of documentation out there to get you started. If you should have a problem with the code that you are writing, please feel free to post again with the code, what you want the code to do, and what actually happens.
This makes it a lot easier to help you with the actual problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900