Text property C1DateInput to C1InputDate 2025v2 399

Posted by: enrique.pv-ext on 13 May 2026, 7:27 am EST

  • Posted 13 May 2026, 7:28 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1InputDate from C1.Web.Wijmo.Controls.48.dll

    Changes C1DateInput to C1InputDate control.

    Now those properties not appears: Text

    C1InputDate has Date nullable (DateTime?).

    I need change legacy code, that uses Text property:

    New C1InputDate.Date.Value can be fail if Date is null

     // TODO: DATE NULLABLE 
        //Selected date
        //date = Text3.Text;
        date = Text3.Date.Value.ToShortDateString();
        fecha = date.Split('/');
        month = fecha[0];
        year = fecha[1].Substring(0, 4);
    	

    or

      // TODO: NEW Date Nullable
        //desde = Text3.Text;
        //hasta = Text4.Text;
        desde = Text3.Date.Value.ToShortDateString();
        hasta = Text4.Date.Value.ToShortDateString();
    
    
        fecha = desde.Split('/');
    
        day = fecha[0];
        month = fecha[1];
        year = fecha[2].Substring(0, 4);
    
        desde = year + "/" + month + "/" + day + " 00:00";
    
        fecha = hasta.Split('/');
    
        day = fecha[0];
        month = fecha[1];
        year = fecha[2].Substring(0, 4);
    
        hasta = year + "/" + month + "/" + day + " 23:59";
    	

    any suggestions migrate legacy code from C1DateInput.Text (string) to C1InputDate.Date (DateTime?) ?

    Thansk a lot !!! please, help me, better solution about this, many code using Date+Calendar in many pages and ascx.

  • Posted 14 May 2026, 3:16 am EST

    Hi,

    Yes, you are correct. In the latest C1InputDate control, the Text property (string) has been replaced with the Date property (DateTime?), which aligns with the behavior of modern date-input controls. Therefore, you will need to replace usages of the Text property in your code with the Date property.

    Additionally, since the Date property is a nullable type, it provides a HasValue property (boolean), which you can use in an if-condition to easily determine whether its Value is null before using it. This helps avoid any potential NullReferenceException issues.

    if(Text3.Date.HasValue)
    {
        date = Text3.Date.Value.ToShortDateString();
        fecha = date.Split('/');
        month = fecha[0];
        year = fecha[1].Substring(0, 4);
    }

    Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels