Friday, July 19, 2024

Get today date with jquery

Get today date with jquery

Hello, welcome to In this post, I will tell you Get today date with jquery. I personally like jquery very much. Most of my code is full with jquery. When I stuck in php or other language then that stuckness I remove with jquery code.

In my starting career, I learned jquery first.

Here is the working and testing code to get today date in jquery or javascript:

var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
var todaydate=month + “/” + day + “/” + “/” + year

There are so many jquery code, tricks and i will let you know all. Please do comment if you any query related to this post. Thank you.

the authortherichpost
Hello to all. Welcome to Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 14, Angular 15, Angular 16, Angular 17, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.


  • function projectestimate(){

    var geterrornoti = “”;
    $(“#username-error, #email-209-error, #phone-error, #country-error, #skype-error, #email-209-error-valid, #phone-error-valid, #url1_valid, #url_valid, #capcha-error, #filesizevali”).hide();

    if($(“#username”).val() == “”){$(“#username-error”).show();geterrornoti = “error”;}
    if($(“#email-209”).val() == “”){$(“#email-209-error”).show();geterrornoti = “error”;}
    else if(!validateEmail($(“#email-209”).val())){$(“#email-209-error-valid”).show();geterrornoti = “error”;}
    if($(“#phone”).val() == “”){$(“#phone-error”).show();geterrornoti = “error”;}
    else if(!validateNumber($(“#phone”).val())){$(“#phone-error-valid”).show();geterrornoti = “error”;}
    if($(“#country”).val() == “”){$(“#country-error”).show();geterrornoti = “error”;}
    if($(“#skype”).val() == “”){$(“#skype-error”).show();geterrornoti = “error”;}
    if($(“#dropbox_url”).val() != “” && !validateUrl($(“#dropbox_url”).val())){$(“#url_valid”).show();geterrornoti = “error”;}
    if($(“#gdrive”).val() != “” && !validateUrl($(“#gdrive”).val())){$(“#url1_valid”).show();geterrornoti = “error”;}

    /*if(grecaptcha.getResponse() == “”) {$(“#capcha-error”).show(); geterrornoti = “error”;}*/
    if(geterrornoti != “error”){
    var formData = new FormData();
    var comment1 = $(“#comment1”).val();
    if(comment1 == “”)
    comment1 = “N/A”;
    var reference = $(“#reference”).val();
    if(reference == “How did you hear about us ?”)
    reference = “N/A”;

    var dropbox_url = $(“input[name=dropbox_url]”).val();

    if(dropbox_url == “”)
    dropbox_url = “Not Attached”;

    var gdrive= $(“input[name=gdrive]”).val();

    if(gdrive== “”)
    gdrive= “Not Attached”;

    formData.append(‘updoc’, $(‘input[type=file]’)[0].files[0]);
    formData.append(‘options’, $(“input[name=options]”).val());
    formData.append(‘comment1’, comment1);
    formData.append(‘username’, $(“input[name=username]”).val());formData.append(’email-209′, $(“input[name=email-209]”).val());formData.append(‘phno’, $(“input[name=phno]”).val());formData.append(‘country’, $(“input[name=country]”).val());formData.append(‘skype’, $(“input[name=skype]”).val());
    formData.append(‘reference’, reference);formData.append(‘nature’, $(“input[name=nature]”).val());formData.append(‘amount’, $(“input[name=amount]”).val());
    formData.append(‘dropbox_url’, dropbox_url);
    formData.append(‘gdrive’, gdrive);

    $.ajax({type:”POST”,url:””,data:formData,contentType: false,cache: false,processData: false,
    success: function(response){if(response == ‘sent’){

    setTimeout(function(){$(“.succmsg”).hide();}, 2000);}}
    return false;


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.