Date Picker Not Showing Up when using Chrome
Hi, I have a date range parameters in my report, and when viewing it using IE and Firefox ReportViewer, the date picker is there. But when I tried running it using Chrome, the date picker was missing. I tried double click on the date field itself but nothing. My Chrome version is 17.0.963.79 m. I tried allowing the pop-up blocker (as I read somewhere in this forum to try), but still nothing. Any help is very much appreciated. Thanks.Call me Sam. Once a gunners always a gunners
March 20th, 2012 12:21pm

thanks dattatrey. I will have to talk to our systems guys in order to implement this. Thanks for the link.Call me Sam. Once a gunners always a gunners
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2012 2:03pm

Here is a modified version of the client-side code posted at rajbandi.net due to there being an issue where the datepicker was applied to all input fields (instead of just datetime ones), the datepicker not appearing after an async postback and also the time being displayed after async postback. The code below uses the asp.net ajax client-side library to specify an event handler for whenever there has been an async post on the page to add the datepicker and remove the time from the field. In the filter method I've added a clause to ensure that the item parameter is not an empty string which fixes the issue of the datepicker being applied to all parameter input fields. Note that as well as this client-side code, the server-side code as is on the rajbandi.net site is required. $(document).ready(function () { fixParameters(); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(applicationInitHandler); function applicationInitHandler() { fixParameters(); } function fixParameters() { if ($.browser.webkit) { // add date picker $($(":hidden[id*='DatePickers']").val().split(",")).each(function (i, item) { var h = $("table[id*='ParametersGrid'] span").filter(function (i) { var v = "[" + $(this).text() + "]"; return (v != null && item != "" && v.indexOf(item) >= 0); }).parent("td").next("td").find("input").datepicker({ showOn: "button" , buttonImage: '/Reserved.ReportViewerWebControl.axd?OpType=Resource&Name=Microsoft.Reporting.WebForms.calendar.gif' , buttonImageOnly: true , dateFormat: 'dd/mm/yy' , changeMonth: true , changeYear: true }); }); // remove time from date $($(":hidden[id*='DatePickers']").val().split(",")).each(function (i, item) { var h = $("table[id*='ParametersGrid'] span").filter(function (i) { var v = "[" + $(this).text() + "]"; return (v != null && item != "" && v.indexOf(item) >= 0); }).parent("td").next("td").find("input").parent().children("input").each(function () { $(this).val($(this).val().substring(0, 10)); }); }); } } });
July 19th, 2012 3:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics