0

Is it Possible to combine input Type = Date and input type = Time in One Single Custom Helper. Below is my Short Code

TagBuilder tag = new TagBuilder("input");`enter code here`
tag.Attributes.Add("name", datePickerName);
tag.Attributes.Add("type", "date");
tag.Attributes.Add("value", datePickerValue.ToString("yyyy-MM-dd"));

//Code For Creating Time
TagBuilder tagTime = new TagBuilder("input");
tagTime.Attributes.Add("name", datePickerName);
tagTime.Attributes.Add("type", "time");
tagTime.Attributes.Add("value", datePickerValue.ToString("HH:mm"));
  • Possible duplicate of [Displaying DateTime picker instead of Date picker in ASP .NET MVC 5.1/HTML 5 specific](http://stackoverflow.com/questions/25765750/displaying-datetime-picker-instead-of-date-picker-in-asp-net-mvc-5-1-html-5-spe) – Eric Burdo Dec 30 '16 at 13:01
  • Its Not Duplicate Question............I m Creating a Custom Html Hepler in which i m writing am Above Code in a static method in Static Class.... – beard_less_coder Jan 03 '17 at 04:46

0 Answers0