I use my web app in datepicker jquery, but I have a problem: two of the two tabs are my Near two menus, was I using Dedeeper in each other's menu and there is a menu in the second tab and I also use Detector. When I load my web page, and try to set some dates with the datepicker, then this is the job (it was opened at Doteppe). But after that I go to the second menu in this tab or other tab and try to set some date in my input date, but the datapicar does not open. I also use Ajax in this page. What is wrong? Thx!
& lt; Script src = "http://code.jquery.com/jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/ui/1.10.3/jquery-ui.js" & gt; & Lt; / Script & gt; & Lt; Input type = "text" name = "dateTime" id = "dateTime" placeholder = "yyyy-mm-dd" required /> & Lt; Script & gt; $ (Function () {$ ("# date time"). Date picture ({dateFormat: "yy-mm-dd", changeMonth: true});}); & Lt; / Script & gt;
is a problem selector
$ ("# The ID should be unique to a page Instead of using squares. Because you are using the ID selector , it tried to find the first example of the element. Once it is found, the search stops again, it will never apply to this element in other tabs. Change
input type = "text "Name =" date "" id = "dateTime"
input type = "text" name = "dateTime" class = "dateTime" P> and then select the selector $ (". DateTime") < / Html>
No comments:
Post a Comment