|
Rank: Newbie Groups: Member
Joined: 9/8/2009 Posts: 3
|
Is there any way to control the long page blanking that occurs when using the date picker?
***********UPDATE Using SmartNavigation addresses most of the flashing / page blanking, but the custom width stretching mentioned below remains. - How to get the control to render without the initial stretching from default to custom width?? *******END UPDATE
This seems to be worse if a custom width is used, as when the control renders, it initially appears at the default size and then "stretches" to the larger custom width.
I know that there are visible true / false settings, but am wondering if there is a way to control the rendering, such as render and then display. When I set the datepicker visible property to false, the issue disappears.
Any thoughts?
Thanks, Dave
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Flashing and page/blank should not have anything directly related to DatePicker. That's the standard behavior when page reloads. SmartNavigation is one way to around it, AJAX is another way to around it.
There is no way to directly control browser's rendering process. However you can either code or provide additional "hint" to the browsers. For example, you can place the DatePicker inside a fixed sized DIV so that the browser will have a fixed size when it initially calculates the layout; Or you can set that DIV as invisible first but then use JavaScript to set that DIV as visible when page finishes loading. In any case, you should understand that page reload flashes/delay is VERY normal so I would be cautious not over doing it.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 9/8/2009 Posts: 3
|
Thanks for the response. The combination of your DIV suggestion and SmartNavigation eliminate the flashing, as well as the temporary effect on the rest of my layout while the datepicker renders. However, the datepicker initially renders at its default width and then stretches to the designated width specified in the width property. If I use the default width, then the datepicker renders fine, with no movement.
I guess my bottom line question is the following: Why does the datepicker render at its default width before assuming the specified width? Is there a way around this? If not, I'll live with it, but the rendering would be a lot cleaner if it would render at the specified width immediately instead of assuming the specified width after it is visible.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I believe it's because there are two widths here: the overall DatePicker width (including the textbox and the button), and the textbox width (without the button). When you set the DatePicker width, you are setting the overall width. So it takes a while for the textbox to figure out it needs to grow to fit the overall width. :)
You can try to explicilty set width on PickerStyle and see if it helps. That style is directly applied to the DatePicker textbox.
Thanks
|
|