Link to home
Start Free TrialLog in
Avatar of Nathan Riley
Nathan RileyFlag for United States of America

asked on

Clone Issue With Datetimepicker

I have the cloning, piece working fine, but just realized when I click "Add Flight" to clone and try to select the Departure Time only my original picker is working.  How can I fix this?

http://groupplanner.gallitin.com/flight/create?tripID=21&tripName=Iowa&depart=07%2F20%2F2017&return=07%2F27%2F2017
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nathan Riley

ASKER

Ok, going to give this a try now.

So datetimepicker2 is just in a .js file I created, so calling it as a class vs ID should make it work throughout it sounds like.  Let me piece this together real quick.
Hmm...well I believed I followed your comments correctly, but it's not working at all now.  What did I miss?
Using this library to do it, dunno if changing from and ID to class matters?

https://github.com/Eonasdan/bootstrap-datetimepicker
Got it working, of course it was an issue with missing the uppercase letters of "TimePicker" :)

Thanks for the help.
I guess date class is extra here,

<div class="input-group date DateTimePicker">

unless you have some specific css for that class...
even in that case, you can change date scc as DateTimePicker

other than that, app looks nice now...
Yeah I pulled the date class and then cursor:pointer didn't show up any longer on the icon on right. Assumed it's a basic bootstrap class so left it in there.

Now that page works, but a ton left to do.  Figured out a long time ago best way to learn something is by doing it so this is just a fun thing while I try to learn js and laravel and leave spaghetti code php in my past :)
nope, cursor is coming from here

<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>

Open in new window


http://groupplanner.gallitin.com/css/bootstrap-datetimepicker.min.css, Line 5

.input-group.date .input-group-addon {
    cursor: pointer;
}

Open in new window

@HainKurt, any chance you could take a look at the continuation of this question?  

https://www.experts-exchange.com/questions/29046111/jQuery-update-array-name-on-clone.html

Needs one more tweak.

Thanks!