I want to use date picker on my form for selecting date.
I googled for it and found mostly import library scripts from live site. I don't want to use them.They are of limited use and I can't customize them.
Is there any good customizable date picker plugin which I can integrate and customize according my needs
I am working on zend-framework and heared about zendx. Is there any inbuilt date picker which I can call on my form element and how ?
For one of my projects based on Zend Framework, I used the UI jQuery Datepicker. You can find it here: http://jqueryui.com/demos/datepicker/
Another usefull link is this: Zend Framework - JQuery - Date Picker - Format Date to YYYY-mm-dd
You can use Zendx library for make datepicker element. Read this one.
http://framework.zend.com/manual/en/zendx.jquery.view.html
Related
I am modifying the Vtiger CRM environment and have changed its language from English to Persian. Now I want to replace the Vtiger's calendar (which its system is Gregorian) with another calender. You can see the images of these two calenders below:
Gregorian calendar which already being used in Vtiger:
My solar calendar which I want to use in Persian Vtiger:
I believe that I should use my calendar component in /var/www/html/vtigercrm/jscalendar but I do not know how to replace the Gregorian calendar with new one. I highly appreciate if you help me.
Adapting the datepicker widget
You can write an adapter around your Persian widget, that implements the same interface (objectmethods, not UI) as the original Calendar object. Then vtigercrm can interact with the Adapter as if it was the original, and the Adapter will translate all calls to whatever the Persian widget expects and translate all responses. That calendar.js also patches the Date prototype. From a quick glance, it looks like no clear MVC pattern; the widget acts like both the View and the Controller and the <input>-element acts like the Model. But since the user sees it, it is a View too. Which brings us to
the internal representation
Since the date <input>-element is both the Model and a View either the Persian representation of the date gets POSTed and you need to handle the translation on the server or you change it onload from Gregorian and onsubmit to Gregorian.
If you do the latter, internally vtiger will know only Gregorian and you will have to do the change in all places where dates get displayed.
You could try and adapt what looks like the server model vt_DateTime. And if vtiger would use it everywhere, you would be done.... But I went down the rabbit-hole some more and it looks like the vtiger isn't designed that way... You could clean-up the design and submit a patch, you could find all functions and methods that start with 'format' or you could just post a feature request in the bugtracker.
Anyway, after inspecting the code I know for sure that this is way beyond a StackOverflow answer.
I need a date picker/selector written in php, jquery and probably mysql that is visible for the user to select a particular date and view the contents for that particular date.
An example can be found here
http://soccernet.espn.go.com/scores/_/league/eng.1/english-premier-league?cc=3888
Another example is http://www1.skysports.com/football/fixtures-results/06-september-2012.
You can use the JQuery UI Datepicker and modify it for your own purposes. There a lot of Date Pickers out there. In this case, Google will probably provide you with more answers than Stack Overflow :)
I am working on form and I am looking for a free calendar/date/timestamp app that i can include in my form. basically, in the input text, i want users to click on the calendar icon and pick a date and a time stamp. that value should populate in the input text.
my next question is, in my mysql db, i am calling this field as "datetime", so i am hoping the values can be written in the db.
i am working with php and mysql.
thanks.
For the user interface you are describing to be added to the input field, jQuery Datepicker springs to mind.
http://jqueryui.com/demos/datepicker/
You'll need to include the jQuery library as well as the jQuery UI library. You can use the 'build your download' link and documentation on the jQuery library page to get a fully themed ui download to suit your design needs.
You'll need to make your form post to a server-side script that will take the field and insert it into the DB. Be careful - mysql date time is in the following format - YYYY-MM-DD HH:mm:SS. You can use strtotime and date to format the input from jQuery. After sanitizing the input, you could do something simple like:
date('Y/m/d H:i:s', strtotime($_POST['date']) )
You can use this to make sure in your server script that the date/time is in the proper format before it goes in the database.
This can be done with GUI
Take a look at jQuery UI Date-picker: http://jqueryui.com/demos/datepicker/
Regards to the date conversion there is plenty of functions to help you
http://www.php.net/manual/en/ref.datetime.php
How can I create a calendar in PHP?
Today should be in bold. How could it be coded?
You can try dhtml Calendar, or maybe Yahoo UI's Calendar.
PHP: date should give you everything you need.
Then, format everything in a table.
Firstly, start by capturing your requirements (should it handle month browsing, should it show a week at a time, etc.) - this should let you derive a functional spec of sorts, which should guide you when actually writing the component/page/application
If you mean: "how to show a date picker on your web page from PHP", the answer is to use some default JavaScript library for it. E.g. Dojo or jQuery.
How can I make a calendar in php so that the users will not have to input the date manually.
It's more a javascript feature, actually.
There are many javascript library to do this. One of it is jQuery UI DatePicker. I highly recommended this one.
I've been using the js calendar from http://www.dynarch.com/ and it's nice and it has many options like limiting the date selection within a period, multiple date selection etc.,