Welcome Guest Search | Active Topics | Sign In | Register

DatePIcker inside a Table Options
THoMaSiN
Posted: Friday, March 14, 2008 5:20:42 AM
Rank: Member
Groups: Member

Joined: 12/5/2007
Posts: 27
Hello,

I'm having problems when the DatePicker is inside a table. It seems to inherit the padding for the cells and therefore it grows and acts weird (overrides parent colors with their own cell colors).

I would be happy if I could change those values in the datepicker control, but i dont know where ... I've been looking for this several days ... Although I think the date picker should inherit this property ...

Thanks.
eo_support
Posted: Friday, March 14, 2008 6:52:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

If it's simply inheriting from parent control, you can put a wrapper table outside of the table and set whatever properties on that table to break the inheritance chain.

If the styles are set in your CSS rules with element selector, then the only way is to modify those CSS rules. In that case the browser is doing the right thing by applying those to the day cells (which are table cells) and there is simply no way to change that behavior.

Thanks
THoMaSiN
Posted: Friday, March 14, 2008 6:59:43 AM
Rank: Member
Groups: Member

Joined: 12/5/2007
Posts: 27
The problem doesn't happen in the days cells, it happens around the control. it pads the text box from the calendar image and pads everything again, making the control occupy a bigger space. It only happens when the control is INSIDE a cell. I gess it gets the padding property.

The table solution is what I'm using currently, but I don't think that inserting a table and then the control is the desired usage for a purchased web control ... ? Isn't there a way of not inheriting the values, making them fixed?

I'm using the windows vista template for the DatePicker control.

Thanks.
eo_support
Posted: Friday, March 14, 2008 7:05:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

Unfortunately there isn't. The reason is that Web works by inheriance by default and there are numerous style properties that one can set on the outer element. You are looking at padding today, somebody else might be looking at text align tomorrow. Theoretically we could provide an option for people to override every style property but that would just make the control too bloated and unusable.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.