Is there a way to change the modal format on the react-native-datepicker? I am not seeing anything in the documentation or questions / issues in the repo.
https://github.com/xgfe/react-native-datepicker
Everything is working as expected just curious if I could format it with the year scrollable first, then the day, then the month. I am not talking about the place holder which can be formatted with the "format" attribute. I am talking about the modal that allows you to select the date.
<DatePickerModal
ref={datePickerRef}
date={value}
mode="date"
placeholder="Select date"
format="YYYY-MM-DD"
maxDate={moment().subtract(18, "years")}
confirmBtnText="Confirm"
cancelBtnText="Cancel"
showIcon={false}
customStyles={dateInputStyles}
onDateChange={onDateChange}
/>
Related
I am new to React Native and I want users to select a specific date from a calendar with the TextInput field.
I tried using the keyboardType="date" but it still shows a normal keyboard...
<TextInput
value={birthdate}
keyboardType="date"
onChangeText={(text) => setBirthdate(text)}
placeholder="birthdate"
/>
I am struggling to set my v-calendar datetime picker to 24h format.
I am reading the documentation but still could not make it work: https://vcalendar.io/
<v-date-picker is-expanded id="match-date-time" v-model="date" mode="dateTime" :timezone="timezone" />
I tried different settings but did not find the correct props / parameters for it.
Can someone help in this?
Got it, the secret is:
:is24hr="format24h"
where format24h is a boolean set to true in data definition
I'm writing a user management using react-admin and try to make adding users to groups easier, i.e. by adding groups from a user's edit page using auto-complete. Starting with an example, I've got some success using the following:
<ReferenceArrayInput
label="Group"
source="groups"
reference="groups"
>
<AutocompleteArrayInput
{...props}
resettable={true}
allowEmpty={true}
optionText="name"
fullWidth
/>
</ReferenceArrayInput>
However, this method uses Chip component to display selected items inline. I would like to use a Datagrid instead. I know from the source code that I cannot override the display part of an auto-complete (yet?), so I thought I could resort to hiding Chips via CSS, but I would still need a way to display a Datagrid with current selection. So I tried this (it's wrapped in FormWithRedirect, hence formProps):
<ReferenceArrayField
{...formProps}
label="Group"
source="groups"
reference="groups"
>
<Datagrid>
<TextField source="name" />
</Datagrid>
</ReferenceArrayField>
<ReferenceArrayInput
{...formProps}
label="Group"
source="groups"
reference="groups"
>
<AutocompleteArrayInput
resettable={true}
allowEmpty={true}
optionText="name"
fullWidth
/>
</ReferenceArrayInput>
This works almost exactly as I want it, a Datagrid is displayed and it shows the right data for the selection, however, it's not updated when selected items on AutocompleteArrayInput change. How ever I tried (been through probably all the hooks and contexts), I could not make it work.
Is this possible? How can I make Datagrid update when selection changes on AutocompleteArrayInput?
I have DatePicker in Xamarin.Forms. It is showing date in mobile dd-mm-yyyy format. How can I change it to dd/mm/yyyy format
This is m code
<DatePicker Format="dd/MM/yyyy" Date="{Binding SelectedFromDate}"
</DatePicker>
In above code I am using Format="dd/MM/yyyy" still it is different format in Android mobile
if you want mm/dd/yyyy format, change the code to :
<DatePicker Format="MM/dd/yyyy" Date="{Binding SelectedFromDate}"
</DatePicker>
For other type of formats can be reference from here
I'm using a Dojo Time Text Box on my XPage. When I save a time in this field, the displayed time has a "T" prefix. Is there any way of removing this "T"? Here is my code:
<xp:inputText id="EventEndTime" value="#{document1.EventEndTime}" style="width:160px;"
role="button" title="used to pick a meeting time" required="true"
dojoType="dijit.form.TimeTextBox"
disableClientSideValidation="true">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="required" value="false">
</xp:dojoAttribute>
</xp:this.dojoAttributes>
</xp:inputText>
You can add a custom converter to your inputText control which deletes the "T" before saving and adds "T" during rendering page:
<xp:this.converter>
<xp:customConverter>
<xp:this.getAsObject><![CDATA[#{javascript:value.substring(1)}]]></xp:this.getAsObject>
<xp:this.getAsString><![CDATA[#{javascript:"T" + value}]]></xp:this.getAsString>
</xp:customConverter>
</xp:this.converter>
This way time gets saved as string like "hh:mm:ss" instead of "Thh:mm:ss".
You could use a custom converter to save value as a Notes time value also.
Domino doesn't actually store "Time only", so you would want to use a viewScope variable to bind to your TimeTextBox first and use the load and save events to write to / read from that. I would use the SimpleDateFormat class for conversion which is way more comfortable that manual string operations. Actually a small Java helper class works wonders here.
Alternatively you could use a filter to clean this up.