mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Parsing pasted datetimes
Summary: Add function parseDateTime which parses a string containing both date and time componenents, intended for parsing pasted strings. Add DateTimeParser subclass of ValueParser. Test Plan: Extended parseDate.ts and CopyPaste.ts tests. Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3152
This commit is contained in:
@@ -1714,6 +1714,22 @@ export async function setDateFormat(format: string) {
|
||||
await waitForServer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns time format for datetime editor
|
||||
*/
|
||||
export async function getTimeFormat(): Promise<string> {
|
||||
return driver.find('[data-test-id=Widget_timeFormat] .test-select-row').getText();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes time format for datetime editor
|
||||
*/
|
||||
export async function setTimeFormat(format: string) {
|
||||
await driver.find('[data-test-id=Widget_timeFormat]').click();
|
||||
await driver.findContent('.test-select-menu .test-select-row', format).click();
|
||||
await waitForServer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns "Show column" setting value of a reference column.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user