There are two other <script> blocks that you may need to manually include in the HTML of your page if your page does not render at least one date picker on initial Page_load.
You may be using a GridView, Panel or similar control which does not render a date picker on initial page_load, but only on a postback/callback. For example, the edit item Template on a GridView.
In the sample above a date picker is written to the page on initial Page_load. That initial date picker writes the required start-up script and Culture script blocks to the page and on all subsequent postbacks/callbacks the JavaScript is there for the date pickers to use.
We overlooked that if you do not have a date picker visible on Page_load you have to manually include the following two <script> blocks at (or near) the bottom of the page html. One example is for basicdatepicker, and one for bdplite. See:
<script type="text/javascript"><!--
/* Basic Date Picker Inc. 2004-2006. All rights are reserved. Unauthorized use prohibited. Visit http://www.basicdatepicker.com/ for more info. Version 1.2.2071 */ var basicDatePicker = (window.BasicDatePicker) ? new BasicDatePicker() : "NoJS";function basicDatePickerButtonElementClick(b, v, l, params, stayOpen){if(basicDatePicker == "NoJS")alert("Unable to find script library '/aspnet_client/basicframe_webcontrols_basicdatepicker/1_2_2071/basicdatepicker.js'. Try placing this file manually by uploading the /aspnet_client directory to your web application root.\n\nTypically the aspnet_client directory can be found at the following path:\nc:\\inetpub\\wwwroot\\aspnet_client\\");else if(basicDatePicker){basicDatePicker.stayOpen = stayOpen;basicDatePicker.showPopUp(b, v, l, params);}} //--></script>
<script type="text/javascript"><!--
/*The BDPLite calendar date picker is FREE to use and redistribute, subject to terms of license agreement. Please visit http://www.basicdatepicker.com/bdplite/ for moreinformation. Copyright Basic Date Picker Inc. 2004-2006. All rights reserved. Version 1.2.2071 */ var bdpLite = (window.BDPLite) ? new BDPLite() : "NoJS";function bdpLiteButtonElementClick(b, v, l, params, stayOpen){if(bdpLite == "NoJS")alert("Unable to find script library '/aspnet_client/basicframe_webcontrols_basicdatepicker/1_2_2071/bdpLite.js'. Try placing this file manually by uploading the /aspnet_client directory to your web application root.\n\nTypically the aspnet_client directory can be found at the following path:\nc:\\inetpub\\wwwroot\\aspnet_client\\");else if(bdpLite){bdpLite.stayOpen = stayOpen;bdpLite.showPopUp(b, v, l, params);}} //--></script>
PLUS: Add the following Culture script block.
<script type="text/javascript"><!--
var basicDatePickerCulture_en_CA = {monthNames:new Array("January","February","March","April","May","June","July","August","September","October","November","December"), monthNamesAbbr:new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"), dayNames:new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"), dayNamesAbbr:new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"), firstDayOfWeek:0};
//--></script>
It would be best to create your own version of the above script blocks by making a new WebForm, dropping a date picker on the page and then view the page in a browser. If you View > Source a similar block of script will be written to the page near the bottom. Copy/Paste that block of script into your ATLAS page.
After manually including the required startup script and Culture script blocks on the page everything should work fine.
Hope this helps.
Thanks,
Geoffrey McGill
----------------------------------------
Coolite Inc.
Email: support [at] coolite [dot] com
Phone: +1(888)775-5888