jspreadsheet / jspreadsheet/ce

Paste dirty string to dropdown column

Open
#1,004 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.2k
Forks
890
PR merge metrics
No merged PRs in 30d

Description

How to reproduce:

  1. Go to https://bossanova.uk/jexcel/v4/examples/date-and-datetime-picker
  2. Copy to clipboard some random string, like "Test test test"
  3. Paste it to cell B1 (Region dropdown). Cell looks empty. It is ok.
  4. In browser console exec: document.getElementById('spreadsheet').jexcel.getData();
    Result is:
0: Array(3) [ "Flag Fen", "Test test test", "2020-04-19" ]
1: Array(3) [ "Bristol Aero Collection (BAC)", "South West", "2019-04-03" ]
​...

Table don't show me unexpected value, but may send it to server.
What I expect? - Empty value will be ok, I think.
Screenshot attached.

I see the same thing on calendar type with any format settings.

How do you recommend to bypass this trouble?

Screenshot from 2020-06-04 18-18-51

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the date-and-datetime-picker example at the linked URL and reproduce the paste through cell B1. Use document.getElementById('spreadsheet').jexcel.getData() to compare the displayed value with the stored value, including the calendar type. Done means an invalid pasted string is not retained in the returned data, with the same behavior across the mentioned format settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.