Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using knockoutjs with BForms #265

Open
SyntaxThemes opened this issue Dec 22, 2015 · 2 comments
Open

Using knockoutjs with BForms #265

SyntaxThemes opened this issue Dec 22, 2015 · 2 comments

Comments

@SyntaxThemes
Copy link

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
Copy link
Contributor

@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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants