Code Monkey home page Code Monkey logo

date_input's Issues

Override excluded days

Not really a bug, but I'm new to this repository thing and couldnt find how to share my update.
I have been developing an ecommerce site that you can choose your delivery date. Most of the year they don't do deliveries on a Sunday but on specific Sundays they do. So these are the mods I made (line numbers reffer to packed code):

line 52: insert non_selec_override: [],
line 73: add &&(this.indexFor(this.non_selec_override,this.dateToString(date))===false) to the end of the isHoliday function

Usage: non_selec_override: ["YYYY-mm-dd"] - just like the non_selectable array

Positioning

When trying to use date_input inside of an already repositioned div, the calendar would not place itself in the correct position relative to the input field.

I don't know if this is the correct place to post this, but I fixed the problem by changing:
setPosition: function() {
var offset = this.input.offset();

to:
setPosition: function() {
var offset = this.input.position();

This fixed the problem with repositioned DIVs and does not seem to break it if the call is from a non-repositioned DIV.

two bug

i have meet two bugs:

  1. $.browser.msie is undefined.
    this is because of jquery don't support msie from 1.9
    and i fixed.
  2. Uncaught Error: Syntax error, unrecognized expression: td[date=19 Mar 2014]

have no idea..

attribute selectors need to be quoted for latest jQuery 1.5

Change this line:

$("td[date=" + this.dateToString(new Date()) + "]", this.tbody).addClass("today");

to:

$("td[date='" + this.dateToString(new Date()) + "']", this.tbody).addClass("today");

and

$("td[date='" + this.selectedDateString + "']", this.tbody).addClass("selected");

Norwegian January misspelling

January in no_NO should be 'januar', not 'janaur'. I created a fork as advised, but feels so silly for a small change like this. Also, Norwegian months don't really have the first letter capitalized. Anyway, hope it helps!

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.