Jump to content

calendar year view


jahlxx

Recommended Posts

Hi.

I need to have a year view calendar. There is no standard component to do it, and have some options, but none of them covers my need.

In the calendar I will have 2 kinds of days, and need to color the cells depending of the kind of day. For employees, will hace vacation days in one color, and hollydays is other color.

Option 1:

Put in a form 12 calendarpanels with month  view, but have the problem that can't have different colors for every kind of days.

 

Option 2:

Put in a form 12 calendar, but I dont knot hot to hide the headers (where appears the arrows for change the month). I can only hide the today button.

 

Option 3:

Put 12 stringgrids, and bult every one with the days of one month. I know how to do this, but coloring the cells is a heavy process, because I have the calendars in database and ondrawcell procedure I think that is not the best way.

 

Option 4:

Use a year calendar in javascript and put in a htmlframe.

 

The 3 first options are with standard components, and the option 4 not. I prefer to use standard components. Options 1 and 2, cloud be the best, but I don't know.

 

I'm making tests with this options, but can't find the best and the easyest way to do it.

 

That's all.

 

I hope someone can clarify to me.

Thanks.

 

 

Link to comment
Share on other sites

1 hour ago, jahlxx said:

Option 2:

Put in a form 12 calendar, but I dont knot hot to hide the headers (where appears the arrows for change the month). I can only hide the today button.

Hi,

One possible solution

1. CustomCSS:

.customDPicker .x-datepicker-header {
    display: none;
}

2. function picker.beforeInit

function picker.beforeInit(sender, config)
{
    config.cls='customDPicker';
}

 

Link to comment
Share on other sites

13 minutes ago, jahlxx said:

well, finally I've done with some stringgrids.

 

I don't know if it is the est way to do it, but right now ins enough for me.

thanks for all, and hope that in the future, calendarpanel will have year view.

looks like the image:

image.thumb.png.923a1656d31ef80d0785ad916f55aa85.png

Jahlxx

Very nice result :) ,  can you please share a small project with  your aproach?

Link to comment
Share on other sites

  • 6 months later...
  • 4 months later...

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...