Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3443944
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:51:13+00:00 2026-05-18T08:51:13+00:00

Maybe someone somewhere had the same issue and can help me out. I’m using

  • 0

Maybe someone somewhere had the same issue and can help me out. I’m using the DateTimeControl in a User Control (markup) which in turn is used on a page that is part of a SharePoint solution.

On some environments, the DateTimeControl styling appears broken. However, using the default site and the tasks list, the same control’s styling works fine.

Checking the HTML output of the page on the afflicted environment, it seems like the CSS stylesheet is not linked to the page. I checked the directories and the files do exist.

[Edit – More info]

The date picker popup calendar appears inside an iframe, typically referenced like so:

_layouts/iframe.aspx?&cal=1&lcid=1033&langid=1033&ww=0111110&fdow=0&fwoy=0&hj=0&swn=False&minjday=109207&maxjday=2666269&date=11%2F22%2F2010

The markup of the actual file looks like so:

 
<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages" %> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.DatePickerFrame"       %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <% SPSite spServer = SPControl.GetContextSite(Context); SPWeb spWeb = SPControl.GetContextWeb(Context); %>
<html dir="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,multipages_direction_dir_value%>' EncodeMethod='HtmlEncode'/>">
    <head>
    <meta name="GENERATOR" content="Microsoft SharePoint" />
    <SharePoint:CssLink runat="server"/>
    <script type="text/javascript" src="./DatePicker.js"></script>
    <title>Date Picker</title>
    </head>
    <body onload="PositionFrame('DatePickerDiv');" onkeydown="OnKeyDown(event);" style="margin:0;">
      <SharePoint:SPDatePickerControl id="DatePickerWebCustomControl" runat="server" >
          </SharePoint:SPDatePickerControl>
    </body>
</html>

The correct output will include a head section similar to this:


<head>
<meta name="GENERATOR" content="Microsoft SharePoint" />
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/datepickerv4.css?rev=Hu9OlQmu1YOXv7TK%2BQrc5Q%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D"/>

<script type="text/javascript" src="./DatePicker.js"></script>
<title>Date Picker</title>
</head>

Notice the link to the datepickerv4.css stylesheet? However, it has happened on some environments, that the head section in the HTML output, looks like so:


<head>
<meta name="GENERATOR" content="Microsoft SharePoint" />
<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D"/>

<script type="text/javascript" src="./DatePicker.js"></script>
<title>Date Picker</title>
</head>

Notice the missing link? I have tried repairing the installation of SharePoint but alas. I have used the DateTimeControl.ApplyStyleSheetSkin method without success.

It must be something that I need to do, because the DateTimeControl on task lists behave correctly on the affected environments.

Any ideas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:51:14+00:00Added an answer on May 18, 2026 at 8:51 am

    The problem was with managed paths, here follows the scenario:

    A managed path (‘manage’) was created. On the managed path, a team site was created. A blank site was created on ‘manage’ named ‘blanksite’ and within it another site named ‘portal’.

    The path used for the iframe calender page should have been http://host:port/manage/blanksite/portal/_layouts/iframe.aspx but instead only read as http://host:port/_layouts/iframe.aspx.

    Although accessible, the context was incorrect, which meant that the DatePicker’s CSS was never attached.

    To remedy the problem, we have set the DatePickerFrameUrl property of the DateTimeControl elements inside the user control to ‘SPContext.Current.Web.ServerRelativeUrl + “/_layouts/iframe.aspx”‘.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm betting that someone has already solved this and maybe I'm using the wrong
I guess I am missing something quite fundamental and maybe someone can fill me
This makes no sense to me. Maybe someone here can explain why this happens.
Out of ideas and about to start pulling my hair out. Maybe someone out
I think I have some basic understanding problem so maybe someone's able to help
Maybe someone found a workaround for the following problem: It seems as if AXIS
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
jQueryUI Datepicker documentation states that the minDate option can be set using a string
Why doesn't this work? Maybe someone could enlighten me :P var balloon = function(){
Can someone try this and see if it works for you. I can't figure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.