JFXtras Calendar Picker - jfxtras

I would like some samples of code to start using jfxtras calendarpicker, please.
I am writing a JavaFX app scheduler. I need to select multiple dates into an array or list, and would like to keep the calendar open while a user selects and deselects dates. Datepicker closes annoyingly after a selection, and I cannot extend the code to stop it as methods and fields are private :-(
The selections may need to be highlighted in different colors depending on type of selection. The jfxtras calendarpicker looks ideal :-)
I downloaded the jfxtras-icalendarfx-15-r2. jar from https://search.maven.org/search?q=g:org.jfxtras
I have read the javadoc, but would like some simple samples to start.

I don't think there is too much to put in examples; you just create the control add add it to a Pane. If you set
calendarPicker.setMode(CalendarPicker.Mode.MULTIPLE)
then you allow multiple calendars to be selected, which are available in the collection
calendarPicker.calendars()
And that basically is it. As the javadoc describes, you can prevent days from being selected using disabledCalenders, or highlight some using highlightedCalendars, both can be repopulated when the displayed range changes using setCalendarRangeCallback. And that is about it. It does not support different kinds of highlight, but I figure you can use CSS to do something with that. Not sure what your requirements are.
You can take a peek at the tests
https://github.com/JFXtras/jfxtras/blob/11/jfxtras-controls/src/test/java/jfxtras/scene/control/test/CalendarPickerTest.java
I would suggest looking at LocalDatePicker or LocalDateTimePicker instead of Calendar though. Same functionality but using the new DateTime API.
And alternative would be JFXtras agenda.
http://jfxtras.org/overview.html

Related

Dynamic content display

when I select (say customer) using Dropdown I would want to show users all the properties on a side table or division. Essentially, displaying the selected customer's fields on the same page for the users to verify/read.
I am using laravel-backpack for development and finding it difficult to implement. Any help is greatly appreciated.
I'm afraid there's no existing way to achieve that, you'd have to code it.
But you don't have to start from scratch, you can use the code for the select2 field (or whatever field you prefer) and create a new field type, say select2_and_preview by tweaking the Javascript inside that one file.
There's recently been a Feature Request for a similar feature (see here), you might want to pitch in with your opinion if you want it created by the team, and included in the official build.

Is it possible to render Adaptive Cards with Autocomplete Input Text Field in MS Teams

I have the bot which working in MS Teams channel. I use it for creating some FTP groups and other stuff. The key problem, that now i have the large number of that groups and i wanna to filter them, before creating a new one. Is it possible to implement autocomplete for input text-box? I'm trying to use input choice set as a drop down list, but is not good solution, because I have about 200-300 groups, and its very annoying to scroll them down. If you have any solutions, please share it!:)
This is not possible yet. The Adaptive Cards roadmap can be found here.
What you are looking for is 'dynamic searchable select menu (like select2), which is on the roadmap, but currently not planned.
Yes, as #Mick said this feature was not implemented yet. But I hv some workaround to acheive this. We can convert the normal dropdown to the searchable dropdown using select2 jquery plugin.This helps the user to search the value in the dropdown without scrolling for a long time.
I hv attatched the images
1.before plugin how dropdown looks like
2. after plugin how it looks like
below which U can find the difference here
U can simply use jquery cdn and select2 cdn for getting these features.
Now inside the script tag u can write like this
$('select').select2();
So that all te dropdowns will changes to searchable/filterable dropdowns.
Refer this link https://select2.org/getting-started/basic-usage if u have any doubts on how to use this.
This worked for me.

UIPath - Find OCR text position and selecting a day from the calendar

I was trying to grab a website calendar from UiPath. But when I use the Find OCR Text Position or Click OCR text activity in the UiPath Software, it will not give me the exact date that I want to select.
I want to do one thing only: I need to determine today's date, select the date, and press OK.
I figured out how to calculate today's date:
But now I only have to do, is selecting numbers, Please help me to figure this out. Thanks in advance.
Since we don't know much about the front-end framework you're planning to use, here's a generic approach using a relative selector. Note that I hard-coded the day (15), and I didn't check whether the correct month or year is displayed, but this should at least get you started.
My approach uses a simple click activity with the variable day being part of the selector. There's another click activity associated with opening the picker in the first place, but as said - this is just related to the front-end framework.
It looks like DateTime_Today is a DateTime type variable in your screenshot, which has a very useful ToString method see documentation on it here: https://learn.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=netframework-4.7.2 which will allow you to extract the number that you are looking for.
You would need to create a string variable and assign the value to DateTime_Today.ToString("dd") to get only the day of the month.
The issue with this approach, however, is then creating the image for the OCR to look for in the calendar. I think a more reliable way of approaching this issue would be to determine what date is selected by default when clicked and then sending some combination of hotkeys such as tab and the directional keys to get to the date which is required for the automation. A get text or get attribute activity might also help determine what date is currently selected, so you would then know how many boxes will need to be traversed to get the required selection.
If you are still having issues please provide a link to the page which you are trying to automate as well as some (sanitized) code snippets containing what you have already tried and we will be able to assist you further. Cheers!

Highlighting specific days on Calendar

I'm using the Nativescript Pro UI RadCalendar and have a requirement which requires me to highlight certain specific days when the calendar is in Month View.
I understand I can use dayCellStyle however this doesn't allow me to apply this style to only specific days.
I have also tried using the selectedDayStyle and passing in my array of selected dates which works but only if I pass in Multiple to the selectionMode property which allows the user to unselect the highlighted dates.
Is there something I'm missing or is this use case not supported yet?
Styling or preventing selection of a particular day is not supported by RadCalendar. But an ugly workaround could be listening to selected dates change event and apply the selected dates you want back at RadCalendar.
Here is a Playground Sample, I was able to verify it with Android, hope it works with iOS too.

People Picker for MVC3

I am looking for People Picker Control similar to SharePoint one for MVC3 applications.
Can you please suggest if there are any such controls available?
What is the best approach to pick the people from AD in MVC3?
Requirement: On one of the Views, I need to select a user from AD.
I was thinking about People Picker kind of control.
Thanks
Arun
I know this is quite old so I doubt you still need this answered but perhaps it will be useful to someone else.
Just last week I had to build a control like does this for us. It's basically two main parts, a JSON service that accepts partial text and returns a list of suggestions and the HTML/CSS/jQuery+UI control.
The service is pretty straightforward so we'll skip over that here.
I'm in the process of doing a write-up on the web side but basically we wrapped the jQuery autocomplete with some custom CSS to make an input that is similar to the address line in GMail. This was done by styling a container div to look like a long input field. The actual input field is within that container and styled to be essentially invisible. Clicking in the container moves focus to the input box. Upon selecting a suggested name, I create a new container to insert before the 'cloaked' autocomplete input which contains the user name and a hidden input with our desired value to send along when the form is submitted. I had to do some other overloads on the autocomplete to get it to act consistently but essentially this is all there was to it.
The control looks at the container for a data-input-name attribute to figure out what 'name' to set the hidden inputs to when they are created with each user pick. When the form is submitted the default model binder rolls all the users of a particular picker (since you can have multiple on a page) into string arrays of the values - assuming your model has string array properties with the same name as used by the input controls - which we can then process on the server side.
By far the hardest part was figuring out the right HTML + CSS to get the look and feel right. I'm not a very strong UI person so this took me forever and still falls down in Chrome which seems to add an accent around input boxes even with (or because of?) styles which make it blend into the parent control.
For our purposes it's been working great over the last week.
UPDATE: It's now on GitHub with a Demo.

Resources