Jump to content

TUniCalendar select week


lema
 Share

Recommended Posts

Hello !

As title says,

is there any way to select -or mark- a week in uniCalendar (as screenshot below).

No need to get the range, or dynamically selection. I just want to use it in conjunction with uniCalendarPanel (in week mode).

(running v.1.90.0.1554)

 

TIA,

Lefteris.

 

image.png.a9c1e8c682c17f61c100534acfc75544.png

Link to comment
Share on other sites

17 minutes ago, Sherzod said:

I will post here, later

1. UniServerModule.CustomCSS:

.customTr {
   background-color: yellowgreen;
   transition: all 0.3s ease-in;
}

2. MainForm.Script:

Ext.override(Ext.DatePicker, {
    update: function(date, forceRefresh) {
        var me = this;

        this.callParent(arguments);

        Ext.defer(function() {
            me.fireEvent("select");
        }, 200);
    }
});

3. UniCalendar -> ClientEvents -> ExtEvents -> function picker.select(sender, date, eOpts)

function picker.select(sender, date, eOpts) 
{
    var me=this;
    
    me.getEl().select('tr').each(function(el) {
        el.removeCls('customTr')
    });

    Ext.defer(function() {
        me.getEl().select('.x-datepicker-selected').each(function(el) {
            el.up('tr').addCls('customTr')
        })
    }, 0);
}

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thank you !

I didn't try it yet, but it is really impressive that you can analyze, find and implement it so fast.

Also, I wish, I could understand that JavaScript stuff...

 

I wonder, where can I find such information?

Sencha Ext JS docs? forums? Could you please give me a hint?

 

 

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.

 Share

×
×
  • Create New...