Monday, January 27, 2014

MVC DatePicker the easiest Way

Imagine how your user experience will improve if you provide a date picker to pick a date in your applications. As you know there are several JQuery plugins available which provide this functionality. But as a MVC developer you have to integrate Javascript with your code and write both dotnet code and javascript code. We all know that how tedious that it can be.

Again imagine that how it would be to do this in just few simple lines in dotnet code and not worry about JQuery. Now check the below code:

    @(Html.Juime().DatePicker("datePicker")
                    .DataMap(item =>
                        {
                            item.Value = DateTime.Today;
                        }
                    )
    )

Here is the output of the above code:

As you see with few lines of code we were able create a DatePicker control in our application. Juime made this possible J

Juime is a free open source controls built on top of famous JQuery UI. With Juime you can bring JQuery UI controls into your project without any JavaScript code. Juime also provides several customizable configuration options for this date picker or any other controls. 

Check our GitHub site for more details.


No comments:

Post a Comment