Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Time settings in the Start Date and End Date configurationTime settings in the Start Date and End Date configuration
Previous
 
Next
New Post
5/3/2011 11:30 PM
 
Hello all.
When we add a page, under the Other Settings category, the Start Date and End Date can be specified. What about the granularity of hours level?
Can we set somehow the time values in addition to the date ones for a page Start and End?
Thank you.
Woogon
 
New Post
5/4/2011 3:33 AM
 
Woogon

Ok, in generally granularity of hours level is not available. But if you like, you can do small modifications in the 2 files and it will be fine for you. This changes are not critical so you can try them. You have to have an access to the files of your DNN installation.

  1. Go to the DesktopModules\Admin\Tabs\ the folder.
  2. Make a backup of the 2 files: managetabs.ascx and managetabs.ascx.vb. In case something goes wrong, then you can restore them.
  3. Open managetabs.ascx for edit. Find text 

    <asp:TextBox ID="txtStartDate" CssClass="NormalTextBox" runat="server" MaxLength="11" Width="120" Columns="30"/>

    and change MaxLength to 30 so text will be like 

    <asp:TextBox ID="txtStartDate" CssClass="NormalTextBox" runat="server" MaxLength="30" Width="120" Columns="30"/>
  4. Next you should remove validator, because it checks for valid Date, but we will use DateTime. Find text 

    <asp:CompareValidator ID="valtxtStartDate" resourcekey="valStartDate.ErrorMessage" Operator="DataTypeCheck" Type="Date" runat="server" Display="Dynamic" ControlToValidate="txtStartDate"/>

    and remove it at all.
  5. Save changes.
  6. To prevent trimming on load you have to change one line in the managetabs.ascx.vb also. Open this file for edit and find text 

    txtStartDate.Text = Tab.StartDate.ToShortDateString

    and replace it with this one 

    txtStartDate.Text = Tab.StartDate.ToString
  7. Save changes.
Thats it. Now you can put into the textbox fully DateTime like 5/11/2011 3:30:00 PM.

Hope this helps!

Sergey

PS: Exactly the same can be done for EndDate. You just need to Search for controls with word End, not Start.
 
New Post
5/4/2011 9:35 AM
 
Sergey Velichko wrote:
Woogon

Ok, in generally granularity of hours level is not available. But if you like, you can do small modifications in the 2 files and it will be fine for you. This changes are not critical so you can try them. You have to have an access to the files of your DNN installation.

  1. Go to the DesktopModules\Admin\Tabs\ the folder.
  2. Make a backup of the 2 files: managetabs.ascx and managetabs.ascx.vb. In case something goes wrong, then you can restore them.
  3. Open managetabs.ascx for edit. Find text 

    <asp:TextBox ID="txtStartDate" CssClass="NormalTextBox" runat="server" MaxLength="11" Width="120" Columns="30"/>

    and change MaxLength to 30 so text will be like 

    <asp:TextBox ID="txtStartDate" CssClass="NormalTextBox" runat="server" MaxLength="30" Width="120" Columns="30"/>
  4. Next you should remove validator, because it checks for valid Date, but we will use DateTime. Find text 

    <asp:CompareValidator ID="valtxtStartDate" resourcekey="valStartDate.ErrorMessage" Operator="DataTypeCheck" Type="Date" runat="server" Display="Dynamic" ControlToValidate="txtStartDate"/>

    and remove it at all.
  5. Save changes.
  6. To prevent trimming on load you have to change one line in the managetabs.ascx.vb also. Open this file for edit and find text 

    txtStartDate.Text = Tab.StartDate.ToShortDateString

    and replace it with this one 

    txtStartDate.Text = Tab.StartDate.ToString
  7. Save changes.
Thats it. Now you can put into the textbox fully DateTime like 5/11/2011 3:30:00 PM.

Hope this helps!

Sergey

PS: Exactly the same can be done for EndDate. You just need to Search for controls with word End, not Start.

 Sergey,
Thank you for your answer. In the item 4, do you remove the validation part at all? Can you modify the validation part instead of removing?
Thanks again.
Woogon

 
New Post
5/5/2011 3:43 AM
 
Woogon

Yes, i removed validation at all. Sure, it is possible to change validation, but then it needs to use RegularExpressionValidator and i have to know what format of the DateTime do you use. Format of the DateTime is different for different countries and ever regions inside single country.

Sergey
 
New Post
5/5/2011 12:05 PM
 
as far as I can see, you might need local to server time conversion, if the admin is not located in server time zone.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Time settings in the Start Date and End Date configurationTime settings in the Start Date and End Date configuration


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out