1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Not a Bug DatePicker didn't work with AJAX

Discussion in 'Resolved Bug Reports' started by Milano, Feb 15, 2014.

  1. Milano

    Milano Well-Known Member

    As the title, <input type="date" /> didn't work if the template was loaded via Ajax.
  2. Amaury

    Amaury Well-Known Member

    What exactly is the problem, though? What happens?

    The calendar is coming up fine for me on Mozilla Firefox 27.0.1.
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    It is due to the fact that when JavaScript listeners are added, it doesn't add to items added to the DOM post load.
  4. Milano

    Milano Well-Known Member

    Chrome 32.0.1700.107 m (support <input type="date" />): render its own UI chrome.png
    Firefox 27.0.1 (doesn't support <input type="date" />): render normal textbox firefox.png

    The date picker didn't show up when the textbox got focused on both browsers

    Attached Files:

  5. Mike

    Mike XenForo Developer Staff Member

    I can't reproduce this. I put a date input into the thread_watch template as an easy test. When the overlay loaded, the date picker was usable.

    If you're using custom loading schemes, it's your responsibility to initialize the XF JS framework on those elements.
    Milano likes this.
  6. Milano

    Milano Well-Known Member

    I'm using the same way the code event listener description was loaded, and yes initialize the js again made it works

Share This Page