Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > Back date and Future date is not working in radMaskedEditTextbox

Not answered Back date and Future date is not working in radMaskedEditTextbox

Feed from this thread
  • Ulagarajan avatar

    Posted on Sep 14, 2011 (permalink)

    Hi Team,

    When doing some research on radmaskedittextbox(DateFormat)  i observed the following things.

    1.By default maskedittextbox is allowing user to select only date between 1st of current month and
    current date.

    2.it is not allowing back date and also future date.

    3.I am not able to clear the default date of radmaskedittextbox(DateFormat)  in runtime.

    but in my application i want to allow back date and also future date.please tell me how to achieve this.

    My Code snippet:
     private void rcStartDate_SelectionChanged(object sender, EventArgs e)
            {        
                rmebStartDate.Clear();
                rmebStartDate.Text = "";
                rmebEndDate.Value = "";
                
                rmebStartDate.Text = rcStartDate.SelectedDate.ToShortDateString().ToString();
                rcStartDate.Visible = false;
            }


    Thanks
    Ulaga

    Reply

  • Peter Peter admin's avatar

    Posted on Sep 19, 2011 (permalink)

    Hi Ulagarajan,

    Thank you for writing.

    The provided information is not enough for me to understand what your scenario is and what you are trying to achieve. Therefore, I would like to kindly ask you to describe your case in greater detail - what your goal is and what issues you are dealing with. Additionally, screenshots and a sample project would be much appreciated.

    Thank you for your understanding and cooperation. I am looking forward to your reply.

    Greetings,
    Peter
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Ulagarajan avatar

    Posted on Sep 22, 2011 (permalink)

    Hi Peter,

    Problem fixed:

    Ans for Ques 1 & 2:

    Actually the problem is when i just set the US-format to calendar in properties alone and then on calendar-selectionchanged, if i am assigning the selected date as radcalendar. ToString() without applying culture,if i am selecting >12th date,it is assigning current date.

    Suppose if i apply the culture to the calendar control programmatically then it is taking both back date and future date.Eg:- rmebEndDate.Text = rcEndDate.SelectedDate.ToString("M", dfi);  

    Ans for Ques3:

    for clearing maskedittextbox i have to give both properties.

     rmebStartDate.Clear();
     rmebStartDate.NullText = "";


    Please suggest me whether my way of doing is correct or is that any alternative way.


    Thanks
    Ulaga

    Reply

  • Peter Peter admin's avatar

    Posted on Sep 28, 2011 (permalink)

    Hi Ulagarajan,

    Thank you for the provided details.

    You should use the Value property instead of Text property, so this line of code:
    rmebEndDate.Text = rcEndDate.SelectedDate.ToString("M", dfi);  

    should be changed to this:
    rmebEndDate.Value= rcEndDate.SelectedDate;

    If this does not help, I will kindly ask you to provide me with a sample project and detailed information on what you are trying to achieve. Please note that have to open a new support ticket in order to be able to attach your project.

    In case that you want to clear the text from RadMaskedEditBox, you should set Null to NullableValue
    this.radDateTimePicker1.NullableValue = null;

    We updated DateTime Picker's Text when the control loses focus. This allows the end-users to start entering Null Date and since the date remains visible, they can edit the date to the date they actually want.

    Thank you for your understanding and cooperation.

    Kind regards,
    Peter
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Editors (TextBox, MaskedEdit, SpinEditor, BrowseEditor, ColorBox) > Back date and Future date is not working in radMaskedEditTextbox
Related resources for "Back date and Future date is not working in radMaskedEditTextbox"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]