jquery-form-datetime

jquery-form-datetime is an extension to jquery-form to generate fields with better user experiences to input date and time.

It extends jQuery.form.renderer with the following types:

  • time-hm-sroll
  • time-hm-select
  • date-calendar
  • datetime-calendar
  • datetime-scroll

For date and datetime fields, the actual values of these fields is turned into unix timestamp (which is measured in seconds, rather then millie-seconds in javascript).

Version

Synopsis

This creates a form with a date picker and a date time picker.

    $("#form1").form({
        legend: 'Datetime demo',
        params: [
            {
                label: 'Date One', name: 'd1', type: 'date-calendar'
            },
            {
                label: 'Date Time', name: 'd2', type: 'datetime-calendar'
            }
        ],
        buttons: [
            {
                "type": "submit",
                "label": "Go",
                "value": "go"
            },
            {
                "type": "reset",
                "label": "Reset"
            }
       ]
    }).submit(function() {
        $("#message").html("You just submit that form:<pre>" + $(this).serialize() + "</pre>");
        return false;
    });

DESCRIPTION

jquery-form-datetime is subject to generate form fields for date/time inputing. It can generate five kind of date/time form field now.

  • time-hm-scroll: This type of field is used to input time(hour and minute). But the user can use a mouse wheel to increase or decrease the time.
  • time-hm-select: You can generate a select element with series of time as its options by using this type. By default, the interval of times is 30 minutes. But you can change it as well.
  • date-calendar: This will generate a input field for input date. A date picker will bind to this field.
  • datetime-calendar: A date picker and a set of select elements will bind to this kind of field.
  • datetime-scroll: This type of field is almost the same as the field generated by type 'time-hm-scroll'. The difference is that 'datetime-scroll' field not only for inputing hour and minutes. It includes both date and time.

Screenshot

Download

Extensions

LICENSE

The MIT License

Copyright (c) 2007, Handlino, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.