Closed vanithav closed 9 years ago
try:
@f.FormGroup().Class("date").TextBoxFor(x => x.MyInput)
I have already tried this. This adds the class to
Oh, you are trying to add class to the other container... There is no currently way to set it. This is one of these situations where you need more flexibility that BMVC gives you. You might need to do straight html in this case. Usually though it's not necessary. What are you trying to achieve by having this class on that div?
yeah am using BVMC currently. I want to set the date-picker for all the date controls in the page at one go. for which i want to use
$('.input-group .date').datepicker();
You could do this instead:
$('.form-group .date').datepicker();
or just:
$('.date').datepicker();
tried already. nope not working. I am using bootstrap datepicker. it renders properly only when we set it for the input-group div. if i set it for the form-group div, it is not rendering properly. it is rendering by default as inline text within the div and not on click of calendar icon.
That's unfortunate. There are plenty of Bootstrap datepickers too. Some work better than others. But if you really want to stick to this one, you might need to just write out html. Sorry I could not provide more help.
No problem. I have used BMVC and got what i wanted. just wanted to know whether i can achieve it using twitter BVMC. Thanks for your time and help.
Hi,
I need to add my own class to the div when i append sth. How do i achieve this? For example, I need class="input-group date".