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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...