Calendar.js in modal get fired only once

Hi,
hope someone can help me on this.

I’ve created an action in Detailview that call a modal like this:

var mb = messageBox({"showHeader": true, "showFooter": true, "size": 'lg'});

I am controlling the modal andcontent with:

mb.setTitle()
mb.setBody()
mb.show()
mb.close()

Inside that modal i’ve created a calendar field copying content from an EditView like this:

<input class="date_input" autocomplete="off" type="text" name="activation_date" id="activation_date" value="" title="myTitle" tabindex="0" size="11" maxlength="10">
                    <button type="button" id="activation_date_trigger" onclick="return false"; class="btn btn-danger"><span class="suitepicon suitepicon-module-calendar" alt="Enter Date"></span></button>
                    </span>
                    <script type="text/javascript">
                    Calendar.setup ({
                    inputField : "activation_date",
                    form : "PromptActivateView",
                    ifFormat : "${input.userFormat}",
                    daFormat : "${input.userFormat}",
                    button : "activation_date_trigger",
                    singleClick : true,
                    dateStr : new Date(),
                    startWeekday: 0,
                    step : 1,
                    customMinDate : new Date(),
                    weekNumbers:true
                    }
                    );
                    </script>

Everything is working but calendar dialog is fired only once onclick.

After the modal is closed, aka mb.close(), and i click again the action, the modal is displayed but the calendar dialog don’t want to display anymore.
The only way to show it again is by refreshing a page.

To summarize the calendar dialog is shown only once at every page refresh.

I’ve checked Calendar.js but not able to find a proper way to fix it.

Any help would be really appreciate.

Many Thanks.