PDA

View Full Version : [CLOSED] Top bar doubles height if datefield has width attribute



posser
Jun 24, 2014, 2:25 PM
Hi everyone

I'm facing a top bar layout issue when trying to specify a datefield width, no matter what size it has. If either width attribute or right buttons configuration are removed, top bar gets thin again. I tried different layout options in my panel, but it has no effects.

Does anyone know why this happens?

Here is my code:



<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Panel ID="PanelChart" runat="server" Layout="FitLayout">
<TopBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:DateField ID="dateStart" runat="server" Format="dd/m/Y" Width="200">
<RightButtons>
<ext:Button ID="Button1" runat="server" Icon="CalendarStar">
<Menu>
<ext:Menu ID="Menu1" runat="server">
<Items>
<ext:MenuItem ID="MenuItem2" runat="server" Text="Yesterday" Handler="this.up('datefield').setValue(Ext.Date.add(new Date(), Ext.Date.DAY, -1));" />
<ext:MenuItem ID="MenuItem3" runat="server" Text="-One week" Handler="this.up('datefield').setValue(Ext.Date.add(new Date(), Ext.Date.WEEK, -1));" />
<ext:MenuItem ID="MenuItem4" runat="server" Text="-Two week" Handler="this.up('datefield').setValue(Ext.Date.add(new Date(), Ext.Date.WEEK, -2));" />
<ext:MenuItem ID="MenuItem5" runat="server" Text="-One month" Handler="this.up('datefield').setValue(Ext.Date.add(new Date(), Ext.Date.MONTH, -1));" />
</Items>
</ext:Menu>
</Menu>
</ext:Button>
</RightButtons>
</ext:DateField>
</Items>
</ext:Toolbar>
</TopBar>
</ext:Panel>
</body>
</html>


Thank you!

Daniil
Jun 24, 2014, 3:07 PM
Hi @posser,

Yes, there are problems with layouting that might be difficult to fix.

As a workaround, please set up Height="20" for the DateField.

posser
Jun 24, 2014, 4:49 PM
Thanks, it works nows!