i want to insert a calendar in java wicket 6.19.I should be able to add events on specified dates.Is this possible?
You can simply add or wrap org.apache.wicket.extensions.markup.html.form.DateTextField to choose some date but of course you have to handle it yourself.
Nice way can be get some nice jquery calendar component and wrap it in your custom wicket component.
Related
Is it possible to select multiple days in toedter's JCalendar? Like I would be able to highlight 2 or 3 days in the calendar and then get the days highlighted after I would trigger an event using a button.
or should i be better off using a JTable for a calendar?
I'd use a one column JTable having a JDateChooserCellEditor and a custom renderer. DemoTable is an example, seen here. The TableModel should contain a List<java.util.Date>, as Date implements Comparable for easy sorting. You can supply an addRow() method in DemoTableModel, which can be invoked in your Add button's handler.
I am working on java and i want to make my java GUI display data like this.
What component or what layout should i use?
First, i think i should do something with JTable to display the table like this.
Second, in each day in this calendar it is clickable. and I think I'll use JButton.I'm not sure if it's ok.
third, the most top of the calendar, i have no idea how to make it display like that.
I want to make a custom date-picker for android and I need to change something in datepicker.class file in android.widget package. In fact, I want to change the year and month for solar hijri calendar.
I found source code of datepicker.java in http://alvinalexander.com/java/jwarehouse/android/core/java/android/widget/DatePicker.java.shtml - but I don't know how to change and replace it with default android class. Does anybody know how to do this?
The dirty way to do this is to copy the source code for the datepicker class, and rename/modify it as your own class for the hijri calendar. You could then import or extend this new class to work with your code.
You could use this custom view which implement jalali date on it
https://github.com/alibehzadian/PersianDatePicker
you could just copy the classes ,layout , values on it and paste them in your project and now you have datepicker for jalali date jsut follow the usage instructions on the provided link
I want to show holidays and weekends (Fridays & Saturdays) in custom style. Is there any attribute provided by PrimeFaces to do this, or what should I do to build a custom component from existing <p:calendar>.
Without using javascript or jquery.
Thanks in advance.
Regards,
Sunny
I think can achieve without writing a custom core custom component.
Create a composite component and use java script to highlight the custom dates you are interested in.
onClick(call the below function on P:cal)
function updatedaysHighlighter(){
var rows = document.getElementById('ui-datepicker-div').getElementsByTagName("tr");
if(days.length>1) {
alert(days[4].innerHTML);
}
}
You can try playing with td and update the class value for each td as like you want.
Its not supported by primeface...
There is a New Feature Request about this exact feature , and one of the comments requested holidays too
You can vote for it Issue 1805: New feature for Calendar: receive a list of Dates to highlight them
But in the meanwhile you better do it yourself using jquery (highlight holidays in datepicker jquery)
I've got a DateTime (SWT.TIME) and want to know if the hours or minutes or seconds are selected.
I would like to get this information because I want that the User can scroll the mouse wheel in order to change the selected values accordingly.
Unfortunately I couldn't find any way to get the selected element of the DateTime Control. Does anybody have an idea?
DateTime provides many methods for getting the selected date. Like getHours, getMinutes, getDay, and so on. It's unclear to me what's your exact question, but appropiate setters are there as well.