Add a JQuery UI Calendar DatePicker Control for uStore Reports - xmpie-users/uStore-js GitHub Wiki

Background

When creating uStore Reports using the inbuilt Calendar Control is not as flexible as other Calendar Controls such as the JQuery UI Datepicker Calendar Control.

Solution

Create a new ParamCtrl for use when creating uStore Reports.
Copy the existing ParamTextBox.ascx file to new file named ParamTextBoxCal.ascx.
installDrive:\XMPie\uStore\App\AdminApp\UIControls\ParamCtrl.
Add the following JavaScript code to the end of the new ParamTextBoxCal.ascx file.
When creating uStore Reports set the ControlName Field to ParamTextBoxCal for the Report Parameter

Note: You can change the Date format or other JQuery UI datepicker paramaters as required i.e dateFormat: "mm/dd/yy"

<script src="/uStoreAdmin/Js/jquery-ui-1.10.3.custom.min.js"></script>
    <link rel="stylesheet" href="/uStoreAdmin/Css/jquery-ui.custom.css">
	<script>
$( document ).ready(function() {
    $( '#<%= tbParam.ClientID %>').datepicker({ dateFormat: "dd/mm/yy" });	
  }); 
</script>

Note / warning

As the new ParamTextBoxCal.ascx file is a new file it shouldn't be overwritten if you repair or update the uStore software. However ensure you keep a backup file of the new file.

⚠️ **GitHub.com Fallback** ⚠️