Datepicker jquery-ui

Aug 11, 2014 at 7:39 PM
I am trying to use jquery-ui datepicker, with Grid.Mvc
I am finding that the date picker comes up nicely, but nothing happens when I actually click on a date.

I have tried a second time, by including bootstrap-datepicker, and this works well with Grid.Mvc, but then everywhere else, I have a problem with the datepicker, as I have implemented jquery-ui datepicker.

I have again tried with bootstrap-datepicker with noConflict, and still doesn't work.

Is there a way that I could have jquery-ui datepicker working with Grid.Mvc, as this is preferred due to localization, and consistency with the rest of the application.

Thanks for your comments!
Aug 12, 2014 at 8:09 AM
If you see only for localization then go with boostrap datepicker itslef..

https://gridmvc.codeplex.com/discussions/550621
Oct 8, 2014 at 8:00 AM
Edited Oct 8, 2014 at 8:01 AM
Yes, I had exactly the same problem. My solution is to move references to these files from the layout page to the page that uses Grid.mvc:
<script src="@Url.Content("~/Scripts/bootstrap-datepicker.js")" type="text/javascript"> </script>
<link href="@Url.Content("~/Content/gridmvc.datepicker.css")" rel="stylesheet" type="text/css" />
This means that all other web pages will load the datepicker for the jquery-ui scripts/css via the page layout, and that the web page that uses the grid.mvc will then override these by the locally declared scripts/css for bootstrap/grid.mvc.

Not ideal as you will need to do this for every web page that uses grid.mvc, but it will do for now until someone has a better solution.

I cannot understand why exactly the same datepicker name would exist in both the bootstrap and jquery-ui reference files? Perhaps they are meant to be used exclusively, but that doesn't help when you have an existing application that was built on jquery-ui.
Oct 8, 2014 at 4:48 PM
The problem with this approach is that you cannot use both on the same page, which would be what I need to do...

Since i'm using Bootstrap, i'm making use of Modals for the popup forms. I'm using jquery-ui for those date pickers, and since they both exist in the same page, I cannot mix them.

The ideal solution would be to have jquery-ui datepicker supported, rather than relying on bootstrap-datepicker....

Only solution that I can think of would be a custom filter widget, but I haven't yet attempted to implement that.
Oct 8, 2014 at 11:29 PM
I assume you want to use the jquery-ui datepicker for a reason, but wouldn't it be simpler to not mix them on the same web page and just use the bootstrap datepicker for your modal popups?
Oct 10, 2014 at 4:59 AM
SonicVader wrote:
I assume you want to use the jquery-ui datepicker for a reason, but wouldn't it be simpler to not mix them on the same web page and just use the bootstrap datepicker for your modal popups?
I started off with jquery-ui, and have extended the datepicker, with a timepicker.
I guess I may need to look for the same extension on bootstrap datepicker, if all else fails.

I think if there is a way to get noConflict working, I could at least have this in working order.

If all else fails,I'll have to go with boostrap datepicker, with timepicker extension...