Using datepickers etc with MVC?

Last post 07-08-2009 5:04 PM by happyfirst. 3 replies.

Sort Posts:

  • Using datepickers etc with MVC?

    07-03-2009, 9:21 AM
    • Member
      62 point Member
    • Svevarn
    • Member since 09-15-2003, 10:11 AM
    • Posts 161

     

    Hello

    I was wondering what opinions you guys have about including calendar-controls and such in views that edits data?

    How do ppl do that the best way? Just drag it out or is there some tricks to extend stuff to the "Html" object? I'm needing something like the AjaxControlkit's tab-control and the calendar. Or do such controls done with jquery nowdays?

    /S

  • Re: Using datepickers etc with MVC?

    07-03-2009, 4:43 PM
    • Contributor
      2,471 point Contributor
    • CodeHobo
    • Member since 08-17-2005, 6:58 PM
    • Southern California
    • Posts 379

    I like using Jquery's DatePicker control since it's a strictly client side control. You can find more information about it here

    http://docs.jquery.com/UI/API/1.7/Datepicker

    You can easily build an HtmlHelper for it.

    Jquery also has a tab control that's part of the Jquery UI package.


  • Re: Using datepickers etc with MVC?

    07-04-2009, 8:47 AM
    • Contributor
      6,521 point Contributor
    • gerrylowry
    • Member since 07-03-2008, 1:46 AM
    • alliston ontario canada
    • Posts 2,256

    imo, it's important to consider that JavaScript and therefore also Ajax (Asynchronous Javascript and xml) may not work on some of your end user's computers because the end user and/or the administrator(s) of the end user can disable JavaScript.

    Therefore, you also need to add an appropriate <noscript></noscript> alternative.  A message such as "this site requires JavaScript" is not appropriate imo.

     

    Regards,
    Gerry (Lowry)

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes by Susan
  • Re: Using datepickers etc with MVC?

    07-08-2009, 5:04 PM
    • Member
      18 point Member
    • happyfirst
    • Member since 01-24-2008, 3:04 PM
    • Posts 63

    gerrylowry:

    Therefore, you also need to add an appropriate <noscript></noscript> alternative.  A message such as "this site requires JavaScript" is not appropriate imo.

     

    Sure it would be nice to be able to support those users that insist on having javascript off. But in order to do so AND also design as rich and fast a site for most other users, doesn't that really mean that one would be committing to building TWO sites within one?

    Want to use jquery date picker pr jquery grid? Then one would need to provide a complete non javascript alternate?

    There are major sites that do display "Javascript required" like yahoo mail, etc.  Yahoo does let you go to their old classic version but then that just shows, they had to have two sites.

    I agree that your suggestion that the message is not appropriate is correct. But I think the reality to avoid displaying that is that it would be tough to really accomplish unless one was really committed from the beginning to just never use any javascript at all.

     

Page 1 of 1 (4 items)