vtfuture / BForms

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

Using knockoutjs with BForms #265

Open SyntaxThemes opened 8 years ago

SyntaxThemes commented 8 years ago

Hi

Is anyone using knockoutjs with the BForms components. Its seems ok with textbox etc but I am having a problem with the following control

@Html.BsDateTimePickerFor( m => m.StartDate, new { data_bind = "value: StartDate" } )

The binding will not working and even when I change to StartDate data_bind = "value: StartDate.DateValue This also does not work.

Has anyone tried using these controls with knockoutjs?

Thanks

alessandromuresan commented 8 years ago

@SyntaxThemes

Yeah, BForms wasn't exactly created with Knockout in mind, so you may experience some compatibility isues with more complex components, such as the Datepicker. I'll try and set up an example for myself and see what the problem could be, later today. Could you please copy-paste your client-side code here (including your Knockout view-model)?

Regards, Alessandro

SyntaxThemes commented 8 years ago

Thanks for your response.

When you use the data_bind to create a jquery data parameter, this value is placed on the TextValue input of the datetime control instead of the DateValue part.