Set the implementation code of the click Text Box or image pop-up calendar control, text box calendar
<Input id = "startDate" value = "" readonly = "true" type = "text" style = "cursor: pointer "class =" user_datepicker "> <input class =" canlderImg "data-tag =" start "type =" image "src = ".. /.. /I/canlder1.png "> <span> end: </span> <input id = "endDate" value = "" readonly = "true" type = "text" style = "cursor: pointer; "class =" user_datepicker "> <input class =" canlderImg "data-tag =" end "type =" image "src = ".. /.. /I/canlder1.png ">
// Js Code
$ ("# StartDate "). datepicker (); $ ("# endDate "). datepicker (); // click the image to bring up the calendar control, you need to bind the click event to the image $ (. canlderImg ). on ("click", function (e) {var tagclustering (e.tar get ). attr ("data-tag"); if (tag = "start") {$ ("# startDate "). datepicker ("show");} else if (tag = "end") {$ ("# endDate "). datepicker ("show ");}});
The implementation code of the above settings by clicking the text box or image pop-up calendar control is all the content shared by xiaobian. I hope to give you a reference, and I hope you can also support the help house.