Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Feature request: Klick on icon toggle #935

Open
Erik-r opened this Issue · 3 comments

3 participants

@Erik-r

If the user klicks on the icon datepicker is shown. A next klick on it keeps the shown status. It would be better to close it (toggle status).

@ozgrozer

I had the same problem and in the end solved this way. You can toggle it with following hack.

$(".datepicker").datepicker({
    autoclose:true
}).on("click",function(e){
    if($(this).hasClass("close")){
        $(this).removeClass("close").addClass("open");
    }else{
        $(this).removeClass("open").addClass("close");
        $(this).datepicker("hide");
    }
}).on("changeDate",function(e){
    $(this).removeClass("open").addClass("close");
}).on("hide",function(e){
    $(this).removeClass("open").addClass("close");
});
@Erik-r

@ozgrozer Thank you for your hack. I will try it. Are the events "changeDate" and "hide" necessary? They should be covered by DP already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.