2021年4月25日星期日

Store AM/PM from time input in local storage JavaScript

I'm creating a website that users need to put there check in time in time input and store it to local storage. I can only store the time but not the AM/PM. Why I can't store AM/PM on local storage from my time input? enter image description here

<input type="time" class="form-control" id="txtcheckintime" name="checkintime" required="">    <script>        function passvalues(){          var checkintime=document.getElementById("txtcheckintime").value;          localStorage.setItem("checkintime", checkintime);              return true;    }  </script>  
https://stackoverflow.com/questions/67260658/store-am-pm-from-time-input-in-local-storage-javascript April 26, 2021 at 11:57AM

没有评论:

发表评论