Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Form Dynamic Delivery Date

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42554
    frusciante89
    Member

    I wanted to know how to write some jQuery or javascript to dynamically display a delivery date.
    Here is my codepen http://codepen.io/Mike52/pen/ELnDr
    I know I’m asking alot, I’m just starting jQuery etc.
    Example: if someone selected 24 hour delivery then the delivery date would be the the next day. 2 day delivery 2 days later…obv lol

    #123723
    Paulie_D
    Member

    For one thing I would start with structuring your form more like this.

    http://codepen.io/Paulie-D/pen/FrywI

    I’m just starting to learn jQuery / JS myself but I think a properly structured form would be a good basis,

    #123726
    TylerNYC
    Member

    Hello @frusciante89!

    I wrote something really quick, sorry that it isn’t clean…kind of in a rush!

    http://codepen.io/anon/pen/qadiF

    #123728
    Paulie_D
    Member

    That nice and certainly beyond my current abilities but I’m sure that one could just grab the value of the selected option and add that to ‘today’ and display that way rather than running it 3 times….or am I wrong?

    JS/jQuery gurus?

    #123729
    TylerNYC
    Member

    @Paulie_D

    Yup! But I don’t have the time to make it sexy.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.