Date Formate change from Y-m-d to d-m-Y in jquery | javascript | js

             


              var dob=$("#dob").val();
              var new_dob=dob.split("-").reverse().join("-");
              $("#dob").val(new_dob);

Comments

Popular posts from this blog

Frequently asked: Vue.JS Interview Questions and Answers

Base URL Setting in Codeigniter

How To Secure Apache with Let's Encrypt on Ubuntu (Digital Ocean)