Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: DatePicker Editor Template - ASP.NET MVC

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Mon, Apr 14, 2014, 9:33 AM


Reusable Code

Razor Markup

@model System.DateTime
@{
    ViewData["class"] = ViewData["class"] + " datepicker";
}
@Html.TextBoxFor(m => m, "{0:MM/dd/yyyy}", ViewData)

JavaScript

This assumes you have jQuery UI loaded.

$('.datepicker').datepicker()

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.