Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm trying to include a dateTimePicker on my custom edit page. I am able to get it working using:
<%@ Page Language="C#" MasterPageFile="~/umbraco/masterpages/umbracoPage.Master" AutoEventWireup="true" CodeBehind="editCustom.aspx.cs" Inherits="UmbracoCustomTest.editCustom" %><%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %><%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols.DatePicker" Assembly="controls" %><cc1:PropertyPanel id="PPanel" runat="server" Text="Date"> <cc2:DateTimePicker id="theDate" runat="server" /></cc1:PropertyPanel>
The problem is I cannot assign a value to the DateTimePicker control on Page Load / Not IsPostBack because the .Text property is read-only. What is the right way to assign a value to this control when the edit page is loaded?
Thank you!
Of course, 2 seconds after I post the question, I find the answer.
// Assign a value to the DateTimePickertheDate.DateTime = DateTime.Now// Retrieve the value from the DateTimePickerDateTime myDateTime;myDateTime = theDate.DateTime;// Only do date and not timetheDate.ShowTime = false;
Hopes this helps someone in the future.
i tried it but the desighner is nto geneared in aspx.desighner.cs file
any ideas why ??
Hello,
I got umbraco source code and then change in DateTimePicker class..
there is only get property of Text so i just put Set property
then just update controls.dll its working fine...
Thanks
Jignesh Ramavat
http://hg.apwll.me/umbraco/src/42e0985fede2/components/umbraco.controls/DatePicker/DateTimePicker.cs
From here you can get files
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom Section Edit Page - Using a DataTimePicker
I'm trying to include a dateTimePicker on my custom edit page. I am able to get it working using:
The problem is I cannot assign a value to the DateTimePicker control on Page Load / Not IsPostBack because the .Text property is read-only. What is the right way to assign a value to this control when the edit page is loaded?
Thank you!
Of course, 2 seconds after I post the question, I find the answer.
Hopes this helps someone in the future.
i tried it but the desighner is nto geneared in aspx.desighner.cs file
any ideas why ??
Hello,
I got umbraco source code and then change in DateTimePicker class..
there is only get property of Text so i just put Set property
then just update controls.dll its working fine...
Thanks
Jignesh Ramavat
http://hg.apwll.me/umbraco/src/42e0985fede2/components/umbraco.controls/DatePicker/DateTimePicker.cs
From here you can get files
is working on a reply...