Giter Site home page Giter Site logo

Comments (6)

erichexter avatar erichexter commented on July 19, 2024

You can create a editor template using the out of the box mvc functionality

Eric Hexter

blog | http://Hex.LosTechies.com
info | http://www.linkedin.com/in/erichexter

On Fri, Mar 1, 2013 at 3:38 PM, plwade [email protected] wrote:

Hi Eric, I'm having problems getting the model Edit to work showing the
existing Start Date (see attached screenshot).

Also..... Is it possible to have dates edited with a Calendar DatePicker
rather than a TextBox?

Any help appreciated.

Regards, Paul
[image: Screenshot]https://f.cloud.github.com/assets/3742666/211510/245fee8c-82b8-11e2-8cc7-57d956cda2c4.jpg


Reply to this email directly or view it on GitHubhttps://github.com//issues/77
.

from twitter.bootstrap.mvc.

plwade avatar plwade commented on July 19, 2024

Hi Eric,
Thanks for getting back to me.
re. create a editor template - Does this mean there is a problem with the example application regarding the display/edit of the Start date?
I really would like to get the example app working, so any help appreciated.
Regards,
Paul.

Date: Fri, 1 Mar 2013 14:39:43 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [twitter.bootstrap.mvc] Model editor does not display Start Date (#77)

You can create a editor template using the out of the box mvc functionality

Eric Hexter

blog | http://Hex.LosTechies.com

info | http://www.linkedin.com/in/erichexter

On Fri, Mar 1, 2013 at 3:38 PM, plwade [email protected] wrote:

Hi Eric, I'm having problems getting the model Edit to work showing the

existing Start Date (see attached screenshot).

Also..... Is it possible to have dates edited with a Calendar DatePicker

rather than a TextBox?

Any help appreciated.

Regards, Paul

[image: Screenshot]https://f.cloud.github.com/assets/3742666/211510/245fee8c-82b8-11e2-8cc7-57d956cda2c4.jpg

Reply to this email directly or view it on GitHubhttps://github.com//issues/77

.


Reply to this email directly or view it on GitHub.

from twitter.bootstrap.mvc.

serra avatar serra commented on July 19, 2024

I'll post an example how to do this later today (not at all difficult); not sure if it should be part of the project though. IMO there's no "problem" regarding the editing of datetime fields - it's just not implemented. And since Twitter.Bootstrap doesn't provide a date(time)picker (afaik) it shouldn't be. You can use whatever datetime picker you find fit with this project.

from twitter.bootstrap.mvc.

plwade avatar plwade commented on July 19, 2024

Hi Marjin,
I'll keep an eye out for your post.
Thanks for getting back to me so soon.
Regards,
Paul.
Date: Sun, 3 Mar 2013 23:20:00 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [twitter.bootstrap.mvc] Model editor does not display Start Date (#77)

I'll post an example how to do this later today (not at all difficult); not sure if it should be part of the project though. IMO there's no "problem" regarding the editing of datetime fields - it's just not implemented. And since Twitter.Bootstrap doesn't provide a date(time)picker (afaik) it shouldn't be. You can use whatever datetime picker you find fit with this project.


Reply to this email directly or view it on GitHub.

from twitter.bootstrap.mvc.

serra avatar serra commented on July 19, 2024

The HomeInputModel.StartDate is annotated with DataType.Date, which renders an input typed Date. Some browsers render a datepicker, but some others don't. If you want to guarantee a date picker, you can create an editor in ~/Views/Shared/EditorTemplates named Date.cshtml and hook this to your preferred datepicker (I chose bootstrap-datepicker). Content of Date.cshtml:

@model DateTime
@Html.TextBox("", Model, new {@class = "datepicker"})

For more details, see my blog post

from twitter.bootstrap.mvc.

serra avatar serra commented on July 19, 2024

@plwade - I don't think support for custom editors should be added to this project. If you agree and the above approach works for you, please close this issue.

from twitter.bootstrap.mvc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.