JavaScript library for Time and Date Fields - javascript

What's the best, free JavaScript library to work with time and date fields in a JSP project?
Here are my needs:
Formatting should be customizable.
For a date field, a date picker popup would be a plus.
Does not allow the user to enter invalid characters, much like the time field in Windows clock.
Does not depend on jQuery. Nothing against jQuery, but my project isn't ready to commit to it yet.
If there's one from Apache or SourceForge, that would be great!
Or should I make one myself? :(
Thanks!

Date.js is a very good library, and has validation functions too... but it doesn't offer UI support, so it should be matched with some additional components.
http://www.datejs.com/

jquery datepicker
http://jqueryui.com/demos/datepicker/

Related

What is the meaning of localizing a plugin?

I was reading the manual of a plugin here and at one point it was written:
External plugins like the jQuery UI datepicker have to be localized separately in their own way
What does that mean?
Localization is a broad topic and covers many areas such as writing direction, character encoding, currency, time zones and many many more. But here the sentence is referring to the date picker feature of jQuery and it means if you are developing an app for Chinese audiences or any other culture that uses different kind of calendar you have to change the datepicker yourself and this plugin doesn't do it automatically.
Localization involves taking source content and making it relavant for a local market - this includes translation, number formatting (1,000 vs 1.000), date formatting (03/18/2014 vs 18/03/2014), calendar display (Sunday - Saturday vs. Monday - Sunday), currency, and really anything that would make the content most applicable to a local market.

Calendar with Outlook like functionality

I am trying to do the following for managing appointments.
When the user opens the app, show him a calendar control which will fetch his schedule from the sql server database. If the user is scheduled to meet Mr. A,X and Z on 15th, then the calendar control should display three links in that calendar for that particular day. Clicking on these links will take the user to the details of the person he is supposed to meet. Similarly do for other dates too.
I can use ASP.NET, AJAX, jQuery anything. Are you aware of any existing project or code that exists for the same?
a fully existing project you will not find no,
but you can however use jquery and its vast plugin database for some of your front end functionalities.
however this would just be a small help, as you would still need to do many manual coding,
this just shows a calendar with data. if you provide the data of course.
all server side code would still be your work and possibly the custom front end stuff too, login system, clicking the link opening the calendar on the right spot. etc etc.
if you are interested in doing it this way,
here is a hand full of calendar plugins you could use
ical calendars
Plans
FullCalendar
these are just a few, you can find many more on the net
if you choose not to take this path, there are probably serverside controls you could use,
like telerik's rad Calendar, of course this option comes with a price. i have no knowledge of free alternatives (and defenately not whether those are as flexible as previously mentioned solutions)
telerik.com RadScheduler. I use it alot and its pretty good an flexible. You can do your links scenario with either their Appointment Template or the new jQuery templates.

Preferred calendar for ASP.NET

I search a good calendar for my business application.
The Microsoft ASP.NET calendar is perfect for my requirement, but I heard that this component is not longer supported by Microsoft. My apprehension is that I must in the near future program a new one.
Should I use a jQuery calendar ? Can I use a future-proof library ?
Why not the Calendar control from Ajax Control Toolkit?
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/calendar/calendar.aspx
Also why take a calendar control very seriously ;-)?? If they stop support or change something its not going to be a show stopper. you will be able to update/change easily.
you might want to design your own interface or decade class to be future-proof. i think nothing is certain in this world. In my project, jquery UI is used but i treat it as normal textbox with certain input-format string. You might want to create a custom user control in ASP .NET, therefore even you change the front end UI with correct format; nothing need to be changed to C# code.
In my opinion, it is always adding a decade to 3th part component.
Take your pick from one of these jQuery Calendar plugins.
Calendar Extender AJAX Control Toolkit for ASP.Net 2.0 framework provides AJAX-based client-side functionality to choose the date of the extender control popup calendar.

Prototype/Scriptaculous/JavaScript Data Picker control

In a current project we need a calendar control that can display 2 months at a time rather than the standard 1 month. Unfortunately the project is heavily tied to the Prototype API and Scriptaculous, so the option of using jQuery or any other framework is unavailable. So the control needs to be written in Prototype, Scriptaculous or standard JavaScript.
Does anybody know of any such control?
Thanks,
Chris
NOTE: I forgot to mention it originally, but we are tied to the 1.5 version of Prototype.
Would this script be good for your project ?

Is there any client side validation library that is using tooltips to display validation messages?

I need to include client side validation on one of my forms, and the webdesign did not take into account any space for validation messages.
I think using validation tooltips together with some borders around non-valid input controls would do the job, but I am having problem finding any javascript validation that is using tooltips.
Can anyone recommend a solution? Preferably supporting ASP.NET MVC directly, but this is not a strict requirement, I am ready to customize any javascript solution to suit ASP.NET MVC.
I am using castle validator to do server side validation and MvcValidation (http://blog.codeville.net/2008/04/30/model-based-client-side-validation-for-aspnet-mvc/) solution on client side, which uses LiveValidation. This works very nice, but needs some customization to not display the validation messages next to controls.
The jQuery Validation library is one of the most popular choices. For your question, you can override is the errorPlacement call like this:
$('formName').validate({
errorPlacement: function(error, element) {
element.attr("title",error.html())
.addClass("cssClassWithBorder");
}
});
You can read up on the full options list here: Validation plugin options
There are a few toolkits out there, the one most applicable based on your question would be xVal by Steve Sanderson.
Keep in mind that ASP.Net MVC 2 is bringing a lot more to the table in terms of annotations, validation and simplifying the client/server validation duplication of code that's out there now. It's a provider based model and there should be plenty of community providers coming out that may provide more of what you're after.
The default implementation will be based mostly around the jQuery Validation framework (the same as above) in an annotation bubbling way (same attributes way down on the classes for both server and client code)...very similar to how xVal does it. Based on your timelines and flexibility, waiting for MVC 2 may be a better option and less work.
At the time of this answer, MVC 2 RC is the current release for this.
Dijit's form widgets use popup tooltips as well and are compliant with accessible technologies. Look at the docs for dijit.form.ValidationTextBox for examples.
It might be too heavy for your needs, but you might want to take a look at extjs.com as well as jquery if you haven't already.

Categories