vtfuture / BForms

Bootstrap Forms for ASP.NET MVC
MIT License
62 stars 33 forks source link

BsDateTimePicker rendered as textbox #233

Closed honibis closed 9 years ago

honibis commented 9 years ago

Hi,

I have been trying to select the input control based on dynamic value(Without data annotations) Downside there is representation of how i use in BsBeginForm, but i get textbox instead of datetimepicker.When i debug i see @Html.BsDateTimePicker line is running. Is this a bug or am i doing something wrong?

Regards, Ali

            @switch (item.DataTypes)
            {
                case Datetime:
                    @Html.BsDateTimePicker("name")
                    break;
                default:
                @Html.BsTextBox("name")
                    break;
            }