How to include a date value in a form

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • VFRodriguez
    Sergeant First Class

    • Dec 2007
    • 55

    How to include a date value in a form

    I want to create a loan calculator online in the page


    My problem is that I don't know how to validate the field LOAN START DATE with today's date, so that the user may change it.
    Give me an idea to do this.
    Victor
    My Website
  • VFRodriguez
    Sergeant First Class

    • Dec 2007
    • 55

    #2
    Re: How to include a date value in a form

    I myself will give the answer:
    You need to create three combox: one for the day, one for the month and one for the year. After submitting the form, you need to create the date combining the elements in a .php file.
    $day = $_POST['Day'];
    $month = $_POST['Month'];
    $year = $_POST['Year'];
    So, the resulting date is:
    $resultingdate = $year."-".$month."-".$day;
    NOTE: When creating the combobox, the value for numbers below 10 must have the 0 before.
    Victor
    My Website

    Comment

    • navaldesign
      General & Forum Moderator

      • Oct 2005
      • 12080

      #3
      Re: How to include a date value in a form

      Why don't you simply add a Jquery Date Picker in your form and set the default date to be the "Current Date"?
      Navaldesign
      Logger Lite: Low Cost, Customizable, multifeatured Login script
      Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
      DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
      Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

      Comment

      • VFRodriguez
        Sergeant First Class

        • Dec 2007
        • 55

        #4
        Re: How to include a date value in a form

        How do you do that?
        Victor
        My Website

        Comment

        • navaldesign
          General & Forum Moderator

          • Oct 2005
          • 12080

          #5
          Re: How to include a date value in a form

          From the menu, Insert -> jQuery UI - jQuery Datepicker.
          Navaldesign
          Logger Lite: Low Cost, Customizable, multifeatured Login script
          Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
          DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
          Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

          Comment

          Working...
          X