Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. SharePoint And Calendar Control: cannot select anything

SharePoint And Calendar Control: cannot select anything

Scheduled Pinned Locked Moved ASP.NET
sharepointwpfquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Denis Sabic
    wrote on last edited by
    #1

    Hi, i try to use the Calendar control in a SharePoint-Webpart. Everything looks fine, except that i cannot use any button within the control or select any date. I create an instance of the calendar within the CreateChildControls-EventHandler, I set my styles in the PreRender-Eevent, and render the Calendar. Calendar calendarControl; protected override void CreateChildControls() { calendarControl = new Calendar(); this.Controls.Add(calendarControl); SetStyles(); } public override void RenderControl(HtmlTextWriter writer) { calendarControl.RenderControl(writer); } private void SetStyles() { calendarControl.Style.Add("vertical-align", "middle"); calendarControl.BackColor = Color.WhiteSmoke; calendarControl.NextMonthText = "Next"; calendarControl.PrevMonthText = "Prev"; calendarControl.Style.Add("float", "left"); calendarControl.Style.Add("margin-right", "30px"); calendarControl.TodayDayStyle.BackColor = Color.LightBlue; calendarControl.SelectorStyle.BackColor = Color.Wheat; calendarControl.DayRender += new DayRenderEventHandler(calendarControl _DayRender); } protected void calendarControl_DayRender(object sender, DayRenderEventArgs e) { if(e.Day.IsOtherMonth) e.Day.IsSelectable = false; else e.Day.IsSelectable = true; } Any Ideas why this does not work?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups