When you click the second link (after clicking the first) the first date picker is still bound to the input field on the dialog. I added the following code to remove the datepicker completely when the dialog is closed:
close: function(event, ui){
$(".tanggalan").datepicker("destroy");
...
}
This removes the datepicker when the dialog is closed so that next time one is created it contains the correct min and max dates.
See here for a Fiddle.