public override string GetDisplayText(FormatInfo format, object editValue)
 {
     if (editValue is TimeSpan)
     {
         return(TimeSpanHelper.TimeSpanToString(((TimeSpan)editValue), AllowDayInput));
     }
     if (editValue is string)
     {
         return(editValue.ToString());
     }
     return(GetDisplayText(null, new TimeSpan(0)));
 }
        public override void SetInitialEditText(string initialEditText)
        {
            KillCurrentElementEditor();
            DateTime?initialEditValue = DateTime.MinValue;

            if (!string.IsNullOrEmpty(initialEditText))
            {
                try
                {
                    initialEditValue = new DateTime(TimeSpanHelper.Parse(initialEditText).Ticks);
                }
                catch { }
            }
            SetInitialEditValue(initialEditValue);
        }