Jump to content

Resize Form


ginnix

Recommended Posts

1. UniServerModule -> CustomCSS:

.mycalendar .x-monthpicker {
  height: auto !important; 
  width: auto !important;
}

2. UniCalendar -> ClientEvents -> ExtEvents -> function container.afterrender:

function container.afterrender(sender, eOpts)
{
    sender.addCls('mycalendar');
}

3. UniCalendar -> ClientEvents -> UniEvents -> function picker.beforeInit:

function picker.beforeInit(sender, config)
{
    config.width= "100%"
}

4. UniCalendar -> ClientEvents -> ExtEvents -> function picker.resize:

function picker.resize(sender, width, height, oldWidth, oldHeight, eOpts)
{
    var container=sender.ownerCt;
    var headerHeight=Ext.get(container.el.select('.x-datepicker-header').elements[0]).getHeight();
    var footerHeight=Ext.get(container.el.select('.x-datepicker-footer').elements[0]).getHeight();
    
    var tableHeight=container.el.getHeight()-headerHeight-footerHeight;
    
    container.el.select('.x-datepicker-inner').elements[0].style.height=tableHeight-2;
    container.el.select('.x-datepicker-inner').elements[0].style.top=0;
    
    container.el.select('table td .x-datepicker-date').elements.forEach(function(c){c.style.height="100%"});
    
    container.doLayout();
}
Link to comment
Share on other sites

  • 3 years later...
On 11/4/2017 at 12:45 PM, Sherzod said:

1. UniServerModule -> CustomCSS:


.mycalendar .x-monthpicker {
  height: auto !important; 
  width: auto !important;
}

2. UniCalendar -> ClientEvents -> ExtEvents -> function container.afterrender:


function container.afterrender(sender, eOpts)
{
    sender.addCls('mycalendar');
}

3. UniCalendar -> ClientEvents -> UniEvents -> function picker.beforeInit:


function picker.beforeInit(sender, config)
{
    config.width= "100%"
}

4. UniCalendar -> ClientEvents -> ExtEvents -> function picker.resize:


function picker.resize(sender, width, height, oldWidth, oldHeight, eOpts)
{
    var container=sender.ownerCt;
    var headerHeight=Ext.get(container.el.select('.x-datepicker-header').elements[0]).getHeight();
    var footerHeight=Ext.get(container.el.select('.x-datepicker-footer').elements[0]).getHeight();
    
    var tableHeight=container.el.getHeight()-headerHeight-footerHeight;
    
    container.el.select('.x-datepicker-inner').elements[0].style.height=tableHeight-2;
    container.el.select('.x-datepicker-inner').elements[0].style.top=0;
    
    container.el.select('table td .x-datepicker-date').elements.forEach(function(c){c.style.height="100%"});
    
    container.doLayout();
}

I have a problem with the TUniCalendar component, I put it inside a UniContainerPanel and aligned UniCalendar = alClient even though it keeps cutting the days.

My form is aligned with uniAlignmentServer

Sem título.png

Link to comment
Share on other sites

12 minutes ago, eduardosuruagy said:

I have a problem with the TUniCalendar component, I put it inside a UniContainerPanel and aligned UniCalendar = alClient even though it keeps cutting the days.

My form is aligned with uniAlignmentServer

Hello,

Please make a simple testcase to see the issue.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...